react-native-icon-switcher 0.1.0 → 0.1.1
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/package.json +5 -3
- package/lib/module/typetests/icon-name.typetest.js +0 -8
- package/lib/module/typetests/icon-name.typetest.js.map +0 -1
- package/lib/module/typetests/types-in-sync.typetest.js +0 -7
- package/lib/module/typetests/types-in-sync.typetest.js.map +0 -1
- package/src/typetests/icon-name.typetest.ts +0 -12
- package/src/typetests/types-in-sync.typetest.ts +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-icon-switcher",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Switch the app icon at runtime on React Native and Expo from one config file, with the native wiring generated for you",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"!**/__fixtures__",
|
|
50
50
|
"!**/__mocks__",
|
|
51
51
|
"!**/.*",
|
|
52
|
-
"!plugin/build/**/__tests__"
|
|
52
|
+
"!plugin/build/**/__tests__",
|
|
53
|
+
"!**/typetests"
|
|
53
54
|
],
|
|
54
55
|
"scripts": {
|
|
55
56
|
"example": "yarn workspace react-native-icon-switcher-example",
|
|
@@ -158,7 +159,8 @@
|
|
|
158
159
|
"project": "tsconfig.build.json"
|
|
159
160
|
}
|
|
160
161
|
]
|
|
161
|
-
]
|
|
162
|
+
],
|
|
163
|
+
"exclude": "**/{__tests__,__fixtures__,__mocks__,typetests}/**"
|
|
162
164
|
},
|
|
163
165
|
"codegenConfig": {
|
|
164
166
|
"name": "IconSwitcherSpec",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import 'react-native-icon-switcher';
|
|
4
|
-
import IconSwitcher from 'react-native-icon-switcher';
|
|
5
|
-
IconSwitcher.set('halloween');
|
|
6
|
-
// @ts-expect-error icon name must come from Register.icons
|
|
7
|
-
IconSwitcher.set('typo');
|
|
8
|
-
//# sourceMappingURL=icon-name.typetest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["IconSwitcher","set"],"sourceRoot":"../../../src","sources":["typetests/icon-name.typetest.ts"],"mappings":";;AAAA,OAAO,4BAA4B;AACnC,OAAOA,YAAY,MAAM,4BAA4B;AAQrDA,YAAY,CAACC,GAAG,CAAC,WAAW,CAAC;AAC7B;AACAD,YAAY,CAACC,GAAG,CAAC,MAAM,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// plugin/src/types.ts mirrors this package's config types because the plugin is compiled on its
|
|
4
|
-
// own (rootDir: plugin/src). This fails typecheck the moment the two copies drift apart.
|
|
5
|
-
|
|
6
|
-
export const typesInSync = [true, true, true, true];
|
|
7
|
-
//# sourceMappingURL=types-in-sync.typetest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["typesInSync"],"sourceRoot":"../../../src","sources":["typetests/types-in-sync.typetest.ts"],"mappings":";;AAAA;AACA;;AASA,OAAO,MAAMA,WAKZ,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import 'react-native-icon-switcher';
|
|
2
|
-
import IconSwitcher from 'react-native-icon-switcher';
|
|
3
|
-
|
|
4
|
-
declare module 'react-native-icon-switcher' {
|
|
5
|
-
interface Register {
|
|
6
|
-
icons: 'default' | 'halloween' | 'midnight';
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
IconSwitcher.set('halloween');
|
|
11
|
-
// @ts-expect-error icon name must come from Register.icons
|
|
12
|
-
IconSwitcher.set('typo');
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// plugin/src/types.ts mirrors this package's config types because the plugin is compiled on its
|
|
2
|
-
// own (rootDir: plugin/src). This fails typecheck the moment the two copies drift apart.
|
|
3
|
-
import type * as Runtime from '../types';
|
|
4
|
-
import type * as Plugin from '../../plugin/src/types';
|
|
5
|
-
|
|
6
|
-
type Equal<X, Y> =
|
|
7
|
-
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2
|
|
8
|
-
? true
|
|
9
|
-
: false;
|
|
10
|
-
|
|
11
|
-
export const typesInSync: [
|
|
12
|
-
Equal<Runtime.IconSource, Plugin.IconSource>,
|
|
13
|
-
Equal<Runtime.IconSwitcherConfig, Plugin.IconSwitcherConfig>,
|
|
14
|
-
Equal<Runtime.ResolvedIcon, Plugin.ResolvedIcon>,
|
|
15
|
-
Equal<Runtime.ResolvedConfig, Plugin.ResolvedConfig>,
|
|
16
|
-
] = [true, true, true, true];
|