react-reactive-val 1.0.2 → 1.0.3

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.
@@ -0,0 +1,4 @@
1
+ import { type ReactNode, type ReactElement } from "react";
2
+ export default function useReactiveValue<T extends ReactNode>(initialValue: T): <U extends (T | ((currVal: T) => T)) | unknown | undefined>(updater?: U | undefined) => U extends T | ((currVal: T) => T) ? undefined : ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
3
+ export declare const reallyReactiveVal: <T extends ReactNode>(initialValue: T) => <U extends (T | ((currVal: T) => T)) | unknown | undefined>(updater?: U) => U extends T | ((currVal: T) => T) ? undefined : ReactElement;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AAGf,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,SAAS,SAAS,EAAE,YAAY,EAAE,CAAC,IAqC7D,CAAC,SAAS,4BAAU,OAAO,GAAG,SAAS,yJAnCtD;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,SAAS,EAAE,cAAc,CAAC,KAiCvD,CAAC,CAAC,SAAS,gBAjBM,CAAC,KAAK,CAAC,KAiBH,OAAO,GAAG,SAAS,EACnD,OAAO,CAAC,EAAE,CAAC,KACR,CAAC,wBAnBwB,CAAC,KAAK,CAAC,IAmBZ,SAAS,GAAG,YACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-reactive-val",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -16,9 +16,9 @@
16
16
  "dist"
17
17
  ],
18
18
  "scripts": {
19
- "build:types": "tsc --emitDeclarationOnly",
19
+ "build:types": "tsc --declaration --emitDeclarationOnly --outDir dist",
20
20
  "build:webpack": "webpack --config webpack.config.js",
21
- "build": "npm run build:types && npm run build:webpack",
21
+ "build": "rm -rf dist && npm run build:types && npm run build:webpack",
22
22
  "prepublishOnly": "npm run build",
23
23
  "test": "echo \"Error: no test specified\" && exit 1"
24
24
  },