native-fn 1.0.36 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,20 +4,18 @@ interface NativeConstants {
4
4
  }
5
5
  interface NativeErrors {
6
6
  }
7
- declare interface ModuleBase {
8
- }
9
- declare interface NativePlugin<T> extends ModuleBase {
7
+ declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
10
8
  installed: boolean;
11
9
  name: string;
12
10
  module: T;
13
- Constants: Record<string, any>;
14
- Errors: Record<string, ErrorConstructor>;
11
+ Constants: C;
12
+ Errors: E;
15
13
  }
16
- declare interface NativeBase extends ModuleBase {
14
+ declare interface NativeBase {
17
15
  Version: string;
18
16
  Constants: NativeConstants;
19
17
  Errors: NativeErrors;
20
- extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
18
+ extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
21
19
  }
22
20
  type NativeInstance = NativeBase & NativePlugins;
23
21
 
@@ -25,8 +23,8 @@ declare const Native: {
25
23
  Version: string;
26
24
  Constants: {};
27
25
  Errors: {};
28
- extends<T>(plugin: NativePlugin<T>): NativeInstance;
26
+ extends<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>): NativeInstance;
29
27
  };
30
28
 
31
29
  export { Native as default };
32
- export type { ModuleBase, NativeBase, NativeConstants, NativeErrors, NativeInstance, NativePlugin, NativePlugins };
30
+ export type { NativeBase, NativeConstants, NativeErrors, NativeInstance, NativePlugin, NativePlugins };
package/dist/native.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.0.36";
3
+ var version = "1.0.37";
4
4
  var packageJSON = {
5
5
  version: version};
6
6
 
@@ -1 +1 @@
1
- "use strict";var t="1.0.36";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});module.exports=o;
1
+ "use strict";var t="1.0.37";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});module.exports=o;
@@ -1 +1 @@
1
- var t="1.0.36";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});export{o as default};
1
+ var t="1.0.37";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});export{o as default};
package/dist/native.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var version = "1.0.36";
1
+ var version = "1.0.37";
2
2
  var packageJSON = {
3
3
  version: version};
4
4
 
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Native = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- var version = "1.0.36";
7
+ var version = "1.0.37";
8
8
  var packageJSON = {
9
9
  version: version};
10
10
 
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Native=e()}(this,(function(){"use strict";var t="1.0.36";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError");return new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Native=e()}(this,(function(){"use strict";var t="1.0.37";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError");return new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}})}));
@@ -1,11 +1,9 @@
1
- declare interface ModuleBase {
2
- }
3
- declare interface NativePlugin<T> extends ModuleBase {
1
+ declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
4
2
  installed: boolean;
5
3
  name: string;
6
4
  module: T;
7
- Constants: Record<string, any>;
8
- Errors: Record<string, ErrorConstructor>;
5
+ Constants: C;
6
+ Errors: E;
9
7
  }
10
8
 
11
9
  declare enum OS {
@@ -89,8 +87,8 @@ declare module 'native-fn' {
89
87
  App: AppInstance;
90
88
  }
91
89
  interface NativeConstants {
92
- AppOpenState: AppOpenState;
93
- Messengers: Messengers;
90
+ AppOpenState: typeof AppOpenState;
91
+ Messengers: typeof Messengers;
94
92
  }
95
93
  interface NativeErrors {
96
94
  URLOpenError: typeof URLOpenError;
@@ -7,8 +7,8 @@ declare module 'native-fn' {
7
7
  App: AppInstance;
8
8
  }
9
9
  interface NativeConstants {
10
- AppOpenState: AppOpenState;
11
- Messengers: Messengers;
10
+ AppOpenState: typeof AppOpenState;
11
+ Messengers: typeof Messengers;
12
12
  }
13
13
  interface NativeErrors {
14
14
  URLOpenError: typeof URLOpenError;
@@ -10,7 +10,7 @@ declare module 'native-fn' {
10
10
  Theme: ThemeInstance;
11
11
  }
12
12
  interface NativeConstants {
13
- Appearances: Appearances;
13
+ Appearances: typeof Appearances;
14
14
  }
15
15
  interface NativeErrors {
16
16
  EasingError: typeof EasingError;
@@ -4,19 +4,17 @@ export interface NativeConstants {
4
4
  }
5
5
  export interface NativeErrors {
6
6
  }
7
- export declare interface ModuleBase {
8
- }
9
- export declare interface NativePlugin<T> extends ModuleBase {
7
+ export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
10
8
  installed: boolean;
11
9
  name: string;
12
10
  module: T;
13
- Constants: Record<string, any>;
14
- Errors: Record<string, ErrorConstructor>;
11
+ Constants: C;
12
+ Errors: E;
15
13
  }
16
- export declare interface NativeBase extends ModuleBase {
14
+ export declare interface NativeBase {
17
15
  Version: string;
18
16
  Constants: NativeConstants;
19
17
  Errors: NativeErrors;
20
- extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
18
+ extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
21
19
  }
22
20
  export type NativeInstance = NativeBase & NativePlugins;
@@ -1,11 +1,9 @@
1
- declare interface ModuleBase {
2
- }
3
- declare interface NativePlugin<T> extends ModuleBase {
1
+ declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
4
2
  installed: boolean;
5
3
  name: string;
6
4
  module: T;
7
- Constants: Record<string, any>;
8
- Errors: Record<string, ErrorConstructor>;
5
+ Constants: C;
6
+ Errors: E;
9
7
  }
10
8
 
11
9
  declare enum OS {
@@ -7,8 +7,8 @@ declare module 'native-fn' {
7
7
  App: AppInstance;
8
8
  }
9
9
  interface NativeConstants {
10
- AppOpenState: AppOpenState;
11
- Messengers: Messengers;
10
+ AppOpenState: typeof AppOpenState;
11
+ Messengers: typeof Messengers;
12
12
  }
13
13
  interface NativeErrors {
14
14
  URLOpenError: typeof URLOpenError;
@@ -10,7 +10,7 @@ declare module 'native-fn' {
10
10
  Theme: ThemeInstance;
11
11
  }
12
12
  interface NativeConstants {
13
- Appearances: Appearances;
13
+ Appearances: typeof Appearances;
14
14
  }
15
15
  interface NativeErrors {
16
16
  EasingError: typeof EasingError;
@@ -4,19 +4,17 @@ export interface NativeConstants {
4
4
  }
5
5
  export interface NativeErrors {
6
6
  }
7
- export declare interface ModuleBase {
8
- }
9
- export declare interface NativePlugin<T> extends ModuleBase {
7
+ export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
10
8
  installed: boolean;
11
9
  name: string;
12
10
  module: T;
13
- Constants: Record<string, any>;
14
- Errors: Record<string, ErrorConstructor>;
11
+ Constants: C;
12
+ Errors: E;
15
13
  }
16
- export declare interface NativeBase extends ModuleBase {
14
+ export declare interface NativeBase {
17
15
  Version: string;
18
16
  Constants: NativeConstants;
19
17
  Errors: NativeErrors;
20
- extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
18
+ extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
21
19
  }
22
20
  export type NativeInstance = NativeBase & NativePlugins;
@@ -1,11 +1,9 @@
1
- declare interface ModuleBase {
2
- }
3
- declare interface NativePlugin<T> extends ModuleBase {
1
+ declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
4
2
  installed: boolean;
5
3
  name: string;
6
4
  module: T;
7
- Constants: Record<string, any>;
8
- Errors: Record<string, ErrorConstructor>;
5
+ Constants: C;
6
+ Errors: E;
9
7
  }
10
8
 
11
9
  type SystemColor = 'ActiveBorder' | 'ActiveCaption' | 'AppWorkspace' | 'Background' | 'ButtonHighlight' | 'ButtonShadow' | 'CaptionText' | 'InactiveBorder' | 'InactiveCaption' | 'InactiveCaptionText' | 'InfoBackground' | 'InfoText' | 'Menu' | 'MenuText' | 'Scrollbar' | 'ThreeDDarkShadow' | 'ThreeDFace' | 'ThreeDHighlight' | 'ThreeDLightShadow' | 'ThreeDShadow' | 'Window' | 'WindowFrame' | 'WindowText';
@@ -84,7 +82,7 @@ declare module 'native-fn' {
84
82
  Theme: ThemeInstance;
85
83
  }
86
84
  interface NativeConstants {
87
- Appearances: Appearances;
85
+ Appearances: typeof Appearances;
88
86
  }
89
87
  interface NativeErrors {
90
88
  EasingError: typeof EasingError;
@@ -7,8 +7,8 @@ declare module 'native-fn' {
7
7
  App: AppInstance;
8
8
  }
9
9
  interface NativeConstants {
10
- AppOpenState: AppOpenState;
11
- Messengers: Messengers;
10
+ AppOpenState: typeof AppOpenState;
11
+ Messengers: typeof Messengers;
12
12
  }
13
13
  interface NativeErrors {
14
14
  URLOpenError: typeof URLOpenError;
@@ -10,7 +10,7 @@ declare module 'native-fn' {
10
10
  Theme: ThemeInstance;
11
11
  }
12
12
  interface NativeConstants {
13
- Appearances: Appearances;
13
+ Appearances: typeof Appearances;
14
14
  }
15
15
  interface NativeErrors {
16
16
  EasingError: typeof EasingError;
@@ -4,19 +4,17 @@ export interface NativeConstants {
4
4
  }
5
5
  export interface NativeErrors {
6
6
  }
7
- export declare interface ModuleBase {
8
- }
9
- export declare interface NativePlugin<T> extends ModuleBase {
7
+ export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
10
8
  installed: boolean;
11
9
  name: string;
12
10
  module: T;
13
- Constants: Record<string, any>;
14
- Errors: Record<string, ErrorConstructor>;
11
+ Constants: C;
12
+ Errors: E;
15
13
  }
16
- export declare interface NativeBase extends ModuleBase {
14
+ export declare interface NativeBase {
17
15
  Version: string;
18
16
  Constants: NativeConstants;
19
17
  Errors: NativeErrors;
20
- extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
18
+ extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
21
19
  }
22
20
  export type NativeInstance = NativeBase & NativePlugins;
@@ -7,8 +7,8 @@ declare module 'native-fn' {
7
7
  App: AppInstance;
8
8
  }
9
9
  interface NativeConstants {
10
- AppOpenState: AppOpenState;
11
- Messengers: Messengers;
10
+ AppOpenState: typeof AppOpenState;
11
+ Messengers: typeof Messengers;
12
12
  }
13
13
  interface NativeErrors {
14
14
  URLOpenError: typeof URLOpenError;
@@ -10,7 +10,7 @@ declare module 'native-fn' {
10
10
  Theme: ThemeInstance;
11
11
  }
12
12
  interface NativeConstants {
13
- Appearances: Appearances;
13
+ Appearances: typeof Appearances;
14
14
  }
15
15
  interface NativeErrors {
16
16
  EasingError: typeof EasingError;
@@ -4,19 +4,17 @@ export interface NativeConstants {
4
4
  }
5
5
  export interface NativeErrors {
6
6
  }
7
- export declare interface ModuleBase {
8
- }
9
- export declare interface NativePlugin<T> extends ModuleBase {
7
+ export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
10
8
  installed: boolean;
11
9
  name: string;
12
10
  module: T;
13
- Constants: Record<string, any>;
14
- Errors: Record<string, ErrorConstructor>;
11
+ Constants: C;
12
+ Errors: E;
15
13
  }
16
- export declare interface NativeBase extends ModuleBase {
14
+ export declare interface NativeBase {
17
15
  Version: string;
18
16
  Constants: NativeConstants;
19
17
  Errors: NativeErrors;
20
- extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
18
+ extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
21
19
  }
22
20
  export type NativeInstance = NativeBase & NativePlugins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-fn",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": " ",
5
5
  "type": "module",
6
6