This file contains hidden or 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
import org.gradle.jvm.tasks.Jar | |
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
application | |
id("setup.repository") | |
kotlin("jvm") version "1.7.21" | |
kotlin("plugin.serialization") version "1.7.21" | |
} |
This file contains hidden or 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 script will replace all occurrences of a given class across the .tsx files in the src folder. | |
* Run it from the root folder of the project: `node update-tw-classes.mjs` | |
* | |
* !!!!!! | |
* Commit or stash all changes before running this script. | |
* Backup the folder before running this script. If an error occures while running the script, you will have to discard all changes and restore the backup or from git. | |
* !!!!!! | |
* */ | |
import * as readline from 'readline' |
This file contains hidden or 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
class Debouncer { | |
delay: number | |
private timeout?: ReturnType<typeof setTimeout> | |
private nextCallbackTime = Date.now() | |
private callback?: () => void | Promise<void> | |
constructor(delay: number) { | |
this.delay = delay | |
} |
This file contains hidden or 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
export default interface CountdownDuration { | |
value: number | |
unit: string | |
} |