File tree Expand file tree Collapse file tree 5 files changed +27
-3
lines changed Expand file tree Collapse file tree 5 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1+ import * as R from "react" ;
2+ declare const _default : typeof R . useLayoutEffect ;
3+ export default _default ;
Original file line number Diff line number Diff line change 1+ import * as R from "react" ;
2+ declare const _default : typeof R . useLayoutEffect ;
3+ export default _default ;
Original file line number Diff line number Diff line change 1+ export interface StateWithValue < T > {
2+ use : ( ) => [
3+ T ,
4+ ( newState : T | ( ( prev : T ) => T ) , ac ?: ( newState : T ) => void ) => void
5+ ] ;
6+ useValue : ( ) => T ;
7+ get : ( ) => T ;
8+ useSelector : < TSelected = unknown > ( selector : ( state : T ) => TSelected , equalityFn ?: Comparator < TSelected > ) => TSelected ;
9+ set : ( newState : T | ( ( prev : T ) => T ) , ac ?: ( newState : T ) => void , ca ?: ( ns : T ) => void ) => void ;
10+ reset : ( ) => void ;
11+ }
12+ interface Options < T > {
13+ onSet ?: ( newState : T , prevState : T ) => any ;
14+ }
15+ declare type Comparator < TSelected = unknown > = ( a : TSelected , b : TSelected ) => boolean ;
16+ export declare function newRidgeState < T > ( iv : T , o ?: Options < T > ) : StateWithValue < T > ;
17+ export { } ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-ridge-state" ,
3- "version" : " 4.2.0 " ,
3+ "version" : " 4.2.1 " ,
44 "description" : " react-ridge-state is a very simple global state management library for React and React Native" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
1010 "scripts" : {
1111 "mocha" : " mocha -r jsdom-global/register -r ts-node/register tests/**/*.mocha.tsx" ,
1212 "jest" : " jest --maxWorkers=150" ,
13- "build" : " tsc --noEmit && npx esbuild ./src/* --outdir=dist --minify"
13+ "build" : " tsc && npx esbuild ./src/* --outdir=dist --minify"
1414 },
1515 "devDependencies" : {
1616 "@babel/plugin-transform-runtime" : " ^7.13.10" ,
Original file line number Diff line number Diff line change 55 "declaration" : true ,
66 "outDir" : " ./dist" ,
77 "removeComments" : true ,
8- "jsx" : " react"
8+ "jsx" : " react" ,
9+ "emitDeclarationOnly" : true
910 },
1011 "include" : [" src/*" ]
1112}
You can’t perform that action at this time.
0 commit comments