Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Sep 13, 2024
1 parent 98e3fcd commit 37c595e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/react-hotkeys/src/__tests__/HotkeysProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ it('should return multiple scopes if different scopes are activated', () => {
result.current.enableScope('bar');
});

expect(result.current.activeScopes).toEqual(['foo', 'bar']);
expect(result.current.activeScopes).toEqual(['bar', 'foo']);
});

it('should deactivate scope by calling disableScope', () => {
Expand All @@ -79,7 +79,7 @@ it('should deactivate scope by calling disableScope', () => {
result.current.enableScope('bar');
});

expect(result.current.activeScopes).toEqual(['foo', 'bar']);
expect(result.current.activeScopes).toEqual(['bar', 'foo']);

act(() => {
result.current.disableScope('foo');
Expand Down Expand Up @@ -237,7 +237,7 @@ it('should have no active scopes after deactivating all current scopes', () => {
act(() => {
result.current.enableScope('bar');
});
expect(result.current.activeScopes).toEqual(['foo', 'bar']);
expect(result.current.activeScopes).toEqual(['bar', 'foo']);
act(() => {
result.current.disableScope('foo');
});
Expand Down
9 changes: 5 additions & 4 deletions packages/slate/src/interfaces/editor/TEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ export type TEditor<V extends Value = Value> = {
Editor,
{
id: any;
normalizeNode: <N extends TNode>(
entry: TNodeEntry<N>,
options?: { operation?: TOperation }
) => void;
apply: <N extends TDescendant>(operation: TOperation<N>) => void;
children: V;
getDirtyPaths: <N extends TDescendant>(operation: TOperation<N>) => Path[];
Expand All @@ -52,6 +48,11 @@ export type TEditor<V extends Value = Value> = {
isInline: <N extends TElement>(element: N) => boolean;
isVoid: <N extends TElement>(element: N) => boolean;
markableVoid: <N extends TElement>(element: N) => boolean;
// eslint-disable-next-line perfectionist/sort-object-types
normalizeNode: <N extends TNode>(
entry: TNodeEntry<N>,
options?: { operation?: TOperation }
) => void;
marks: Record<string, any> | null;
operations: TOperation[];
}
Expand Down

0 comments on commit 37c595e

Please sign in to comment.