Skip to content

Commit

Permalink
Rebuild dist files (targeting es2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Nov 3, 2021
1 parent 311e2dc commit 55ae83d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 17 deletions.
3 changes: 0 additions & 3 deletions dist/e.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/e.js

This file was deleted.

3 changes: 0 additions & 3 deletions dist/e.native.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/e.native.js

This file was deleted.

14 changes: 7 additions & 7 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { SetStateAction } from "react";
declare type Set<T> = (newState: SetStateAction<T>, callback?: (newState: T) => void) => void;
declare type UseSelector<T> = <TSelected = unknown>(selector: (state: T) => TSelected, equalityFn?: Comparator<TSelected>) => TSelected;
export interface StateWithValue<T> {
use: () => [
T,
(newState: T | ((prev: T) => T), ac?: (newState: T) => void) => void
];
use: () => [T, Set<T>];
useValue: () => T;
get: () => T;
useSelector: <TSelected = unknown>(selector: (state: T) => TSelected, equalityFn?: Comparator<TSelected>) => TSelected;
set: (newState: T | ((prev: T) => T), ac?: (newState: T) => void, ca?: (ns: T) => void) => void;
useSelector: UseSelector<T>;
set: Set<T>;
reset: () => void;
}
interface Options<T> {
onSet?: (newState: T, prevState: T) => void;
}
declare type Comparator<TSelected = unknown> = (a: TSelected, b: TSelected) => boolean;
export declare function newRidgeState<T>(iv: T, o?: Options<T>): StateWithValue<T>;
export declare function newRidgeState<T>(initialValue: T, options?: Options<T>): StateWithValue<T>;
export {};
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"mocha": "mocha -r jsdom-global/register -r ts-node/register tests/**/*.mocha.tsx",
"test": "jest --maxWorkers=150",
"build": "tsc && esbuild ./src/* --outdir=dist --minify",
"build": "tsc && esbuild ./src/* --outdir=dist --minify --target=es2019",
"lint": "eslint src"
},
"devDependencies": {
Expand Down

0 comments on commit 55ae83d

Please sign in to comment.