mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-10-23 08:00:32 +02:00

* build: enable consistent type imports eslint rule * change to warn * fix the warning in example and excalidraw-app * fix packages * enable type annotations and throw error for the rule
11 lines
280 B
TypeScript
11 lines
280 B
TypeScript
import type { Action } from "./types";
|
|
|
|
export let actions: readonly Action[] = [];
|
|
|
|
export const register = <T extends Action>(action: T) => {
|
|
actions = actions.concat(action);
|
|
return action as T & {
|
|
keyTest?: unknown extends T["keyTest"] ? never : T["keyTest"];
|
|
};
|
|
};
|