Skip to content

Commit

Permalink
version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
atellmer committed Nov 28, 2022
1 parent 86da8e0 commit 430fd5b
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dark-engine/core",
"version": "0.9.15",
"version": "0.10.0",
"description": "Dark is lightweight (10 Kb gzipped) component-and-hook-based UI rendering engine for javascript apps without dependencies and written in TypeScript 💫",
"author": "AlexPlex",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/use-reactive-state/use-reactive-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function reactive<T extends object>(value: T, scope: Scope, update: () => void):

target[prop] = reactive(value, scope, update);

scope.timerId && clearTimeout(scope.timerId);
scope.timerId = setTimeout(() => {
scope.timerId && window.clearTimeout(scope.timerId);
scope.timerId = window.setTimeout(() => {
update();
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/types/fiber/fiber.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ declare class Fiber<N = NativeElement> {
marker: string;
isUsed: boolean;
idx: number;
batched: Array<() => void>;
batched: () => void | null;
catchException: (error: Error) => void;
constructor(options: Partial<Fiber<N>>);
markPortalHost(): void;
Expand Down
3 changes: 2 additions & 1 deletion packages/core/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ export { useLayoutEffect } from './use-layout-effect';
export * from './use-memo';
export * from './use-reducer';
export * from './use-ref';
export * from './use-state';
export * from './use-update';
export * from './use-state';
export * from './use-reactive-state';
export * from './view';
export * from './constants';
export { walkFiber } from './walk';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/types/use-event/use-event.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare function useEvent<T extends (...args: any[]) => any>(fn: T): T;
declare function useEvent<T extends (...args: Array<any>) => any>(fn: T): T;
export { useEvent };
1 change: 1 addition & 0 deletions packages/core/types/use-reactive-state/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './use-reactive-state';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function useReactiveState<T extends object>(value: T): T;
export { useReactiveState };
2 changes: 1 addition & 1 deletion packages/core/types/use-state/use-state.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type ScheduleCallbackOptions } from '../platform';
declare type Value<T> = T | ((prevValue: T) => T);
declare function useState<T = unknown>(
initialValue: T,
initialValue: T | (() => T),
options?: ScheduleCallbackOptions,
): [T, (value: Value<T>) => void];
export { useState };
2 changes: 1 addition & 1 deletion packages/platform-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dark-engine/platform-browser",
"version": "0.9.15",
"version": "0.10.0",
"description": "Dark is lightweight (10 Kb gzipped) component-and-hook-based UI rendering engine for javascript apps without dependencies and written in TypeScript 💫",
"author": "AlexPlex",
"license": "MIT",
Expand Down

0 comments on commit 430fd5b

Please sign in to comment.