Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-dldc committed May 10, 2022
1 parent c42274e commit fca1c82
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/ChildrenUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TreeElementPath,
TreeElementSnapshot,
HookSnapshot,
} from './types.js';
} from './types';
import {
isValidElement,
objectShallowEqual,
Expand All @@ -27,7 +27,7 @@ import {
isPlainObject,
getInstanceKey,
isElementInstance,
} from './utils.js';
} from './utils';

export const ChildrenUtils = {
mount,
Expand Down
2 changes: 1 addition & 1 deletion src/Global.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TreeElement } from './types.js';
import { TreeElement } from './types';

let GLOBAL_STATE: TreeElement<'ROOT'> | null = null;

Expand Down
10 changes: 5 additions & 5 deletions src/Hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import {
RefHookData,
Context,
ContextHookData,
} from './types.js';
import { getCurrentRootInstance } from './Global.js';
import { ChildrenUtils } from './ChildrenUtils.js';
import { getPatchPath, depsChanged } from './utils.js';
import { DEMOCRAT_CONTEXT } from './symbols.js';
} from './types';
import { getCurrentRootInstance } from './Global';
import { ChildrenUtils } from './ChildrenUtils';
import { getPatchPath, depsChanged } from './utils';
import { DEMOCRAT_CONTEXT } from './symbols';

export function useChildren<C extends Children>(children: C): ResolveType<C> {
const root = getCurrentRootInstance();
Expand Down
4 changes: 2 additions & 2 deletions src/Store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Subscription, Unsubscribe } from 'suub';
import { ChildrenUtils } from './ChildrenUtils.js';
import { setCurrentRootInstance } from './Global.js';
import { ChildrenUtils } from './ChildrenUtils';
import { setCurrentRootInstance } from './Global';
import {
globalSetTimeout,
globalClearTimeout,
Expand Down
4 changes: 2 additions & 2 deletions src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './Store.js';
export * from './Hooks.js';
export * from './Store';
export * from './Hooks';

export {
Children,
Expand Down
7 changes: 1 addition & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* eslint-disable @typescript-eslint/ban-types */
/* istanbul ignore next */
import {
DEMOCRAT_ELEMENT,
DEMOCRAT_CONTEXT,
DEMOCRAT_ROOT,
DEMOCRAT_COMPONENT,
} from './symbols.js';
import { DEMOCRAT_ELEMENT, DEMOCRAT_CONTEXT, DEMOCRAT_ROOT, DEMOCRAT_COMPONENT } from './symbols';

export type Dispatch<A> = (value: A) => void;
export type SetStateAction<S> = S | ((prevState: S) => S);
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEMOCRAT_ELEMENT, DEMOCRAT_CONTEXT, DEMOCRAT_ROOT } from './symbols.js';
import { DEMOCRAT_ELEMENT, DEMOCRAT_CONTEXT, DEMOCRAT_ROOT } from './symbols';
import {
FunctionComponent,
DependencyList,
Expand Down

0 comments on commit fca1c82

Please sign in to comment.