1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-10 13:07:17 +00:00

prepare it for api docs

This commit is contained in:
Alula 2021-02-14 00:08:25 +01:00
parent 812acac4e8
commit 7ef3b70edb
No known key found for this signature in database
GPG key ID: 3E00485503A1D8BA
2 changed files with 42 additions and 0 deletions

View file

@ -69,6 +69,25 @@ declare namespace doukutsu {
*/
function playMusic(id: number): void;
/**
* Sets an implementation-defined game setting.
* @param name
* @param value
*/
function setSetting(name: string, value: any): void;
/**
* Registers an event handler called after all scripts are loaded.
* @param event event name
* @param handler event handler procedure
*/
function on(event: "init", handler: EventHandler<void>): EventHandler<void>;
/**
* Registers an event handler called on each tick.
* @param event event name
* @param handler event handler procedure
*/
function on(event: "tick", handler: EventHandler<DoukutsuScene>): EventHandler<DoukutsuScene>;
function on<T>(event: string, handler: EventHandler<T>): EventHandler<T>;

View file

@ -0,0 +1,23 @@
{
"files": [
"doukutsu.d.ts"
],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es2018"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "./",
"typeRoots": [
"./"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}