-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve typescript build process; automatically (re)build repli…
…cant schemas (#93)
- Loading branch information
Alex
authored
Jun 12, 2023
1 parent
ae20746
commit 32ed8a9
Showing
7 changed files
with
147 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const timers = new Map(); | ||
|
||
/** | ||
* A standard debounce, but uses a string `name` as the key instead of the callback. | ||
*/ | ||
export default function (name, callback, duration = 500) { | ||
const existing = timers.get(name); | ||
if (existing) { | ||
clearTimeout(existing); | ||
} | ||
|
||
timers.set( | ||
name, | ||
setTimeout(() => { | ||
timers.delete(name); | ||
callback(); | ||
}, duration), | ||
); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/generators/app/templates/src/types/schemas/exampleReplicant.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters