diff --git a/package.json b/package.json index 2819432785..6e52244cca 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "@auto-it/released": "^10.37.0", "auto": "^10.37.0", "lerna": "^5.3.0", - "moonwave": "^0.3.10" + "moonwave": "^0.3.10", + "@rbxts/types": "latest", + "@rbxts/compiler-types": "latest" }, "scripts": { "release": "auto shipit" diff --git a/src/debounce/package.json b/src/debounce/package.json index 7de5eeceb5..c691d43d9c 100644 --- a/src/debounce/package.json +++ b/src/debounce/package.json @@ -8,6 +8,8 @@ "Lua", "Time" ], + "main": "src/Shared/debounce.lua", + "types": "src/Shared/debounce.d.ts", "bugs": { "url": "https://github.com/Quenty/NevermoreEngine/issues" }, diff --git a/src/debounce/src/Shared/DebounceTimer.d.ts b/src/debounce/src/Shared/DebounceTimer.d.ts new file mode 100644 index 0000000000..c4f3e1f773 --- /dev/null +++ b/src/debounce/src/Shared/DebounceTimer.d.ts @@ -0,0 +1,8 @@ +declare class DebounceTimer { + constructor(length: number); + SetLength(length: number): void; + Restart(): void; + IsRunning(): boolean; + IsDone(): boolean; +} +export = DebounceTimer; diff --git a/src/debounce/src/Shared/debounce.d.ts b/src/debounce/src/Shared/debounce.d.ts new file mode 100644 index 0000000000..7b6cc7d6b8 --- /dev/null +++ b/src/debounce/src/Shared/debounce.d.ts @@ -0,0 +1,5 @@ +declare function debounce>( + timeoutInSeconds: number, + func: (...args: T) => void +): (...args: T) => void; +export = debounce; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..60d285f5fc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "moduleDetection": "force", + "strict": true, + "typeRoots": ["node_modules/@rbxts"] + } +}