typed-config-plugins 0.0.1 → 0.1.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # typed-config-plugins
1
+ # typed-config-plugins [![npm][npm-image]][npm-url]
2
2
 
3
3
  **Type Safety for Your Expo Config Plugins.**
4
4
 
@@ -71,3 +71,6 @@ declare module "typed-config-plugins" {
71
71
  ```
72
72
 
73
73
  Now, when you use `plugin("my-custom-plugin", { /* ... */ })` in your `app.config.ts`, TypeScript will provide autocompletion and validate the options against the types you've defined.
74
+
75
+ [npm-image]: https://img.shields.io/npm/v/typed-config-plugins
76
+ [npm-url]: https://www.npmjs.com/package/typed-config-plugins
package/dist/plugin.d.ts CHANGED
@@ -309,6 +309,7 @@ interface ThirdPartyPlugins {
309
309
  }
310
310
  interface FuncOptionMap extends ThirdPartyPlugins {
311
311
  }
312
- declare function plugin<Options extends FuncOptionMap[Name], Name extends keyof FuncOptionMap>(name: Name, options?: Options): [Name, Options] | [Name];
312
+ declare function plugin<Name extends keyof FuncOptionMap>(name: Name): [Name];
313
+ declare function plugin<Name extends keyof FuncOptionMap, Options extends FuncOptionMap[Name]>(name: Name, options?: Options): [Name, Options];
313
314
 
314
315
  export { type ConfigPluginOptions, type ThirdPartyPlugins, plugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typed-config-plugins",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "adds types to expo config plugins, like @types but for expo config plugins",
5
5
  "author": {
6
6
  "name": "WookieFPV (Lukas Müller)",
@@ -35,8 +35,8 @@
35
35
  "typecheck": "tsc",
36
36
  "prepublishOnly": "bun i && bun run lint:CI && tsc && bun run build"
37
37
  },
38
- "dependencies": {
39
- "@expo/config-plugins": "54.0.0"
38
+ "peerDependencies": {
39
+ "@expo/config-plugins": "*"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@appandflow/expo-camera-characteristics": "*",
@@ -53,6 +53,7 @@
53
53
  "@config-plugins/react-native-pdf": "*",
54
54
  "@corasan/image-compressor": "*",
55
55
  "@datadog/mobile-react-native": "*",
56
+ "@expo/config-plugins": "54.0.1",
56
57
  "@fishjam-cloud/react-native-client": "*",
57
58
  "@giphy/react-native-sdk": "*",
58
59
  "@hot-updater/react-native": "*",