mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
fix ns.prompt typechecking
Introduced some new type assertion functions, initial step in larger type safety rework.
This commit is contained in:
@@ -65,6 +65,9 @@ export const helpers = {
|
||||
failOnHacknetServer,
|
||||
};
|
||||
|
||||
|
||||
/** Will probably remove the below function in favor of a different approach to object type assertion.
|
||||
* This method cannot be used to handle optional properties. */
|
||||
export function assertObjectType<T extends object>(
|
||||
ctx: NetscriptContext,
|
||||
name: string,
|
||||
|
||||
Reference in New Issue
Block a user