From a9719214179e1519d5d153d3ca67da326c0317b2 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 8 Jan 2022 14:56:29 -0600 Subject: [PATCH 1/2] Document null duration for toasts --- dist/bitburner.d.ts | 4 ++-- src/ScriptEditor/NetscriptDefinitions.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index d89465b08..155d83dca 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -3982,9 +3982,9 @@ export declare interface NS extends Singularity { * Queue a toast (bottom-right notification). * @param msg - Message in the toast. * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. - * @param duration - Duration of toast in ms, defaults to 2000 + * @param duration - Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 */ - toast(msg: any, variant?: string, duration?: number): void; + toast(msg: any, variant?: string, duration?: number | null): void; /** * Download a file from the internet. diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 2b3c4d4be..b52917782 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -5670,9 +5670,9 @@ export interface NS extends Singularity { * Queue a toast (bottom-right notification). * @param msg - Message in the toast. * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. - * @param duration - Duration of toast in ms, defaults to 2000 + * @param duration - Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 */ - toast(msg: any, variant?: string, duration?: number): void; + toast(msg: any, variant?: string, duration?: number | null): void; /** * Download a file from the internet. From 357258261aeb32ac237e82238486c3f944dcb549 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 8 Jan 2022 14:59:28 -0600 Subject: [PATCH 2/2] Use codeblocks for `null` --- dist/bitburner.d.ts | 2 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 155d83dca..a105446f3 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -3982,7 +3982,7 @@ export declare interface NS extends Singularity { * Queue a toast (bottom-right notification). * @param msg - Message in the toast. * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. - * @param duration - Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 + * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000 */ toast(msg: any, variant?: string, duration?: number | null): void; diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index b52917782..d3caa1cdc 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -5670,7 +5670,7 @@ export interface NS extends Singularity { * Queue a toast (bottom-right notification). * @param msg - Message in the toast. * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. - * @param duration - Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 + * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000 */ toast(msg: any, variant?: string, duration?: number | null): void;