fix ns.prompt typechecking

Introduced some new type assertion functions, initial step in larger type safety rework.
This commit is contained in:
omuretsu
2022-10-14 11:00:29 -04:00
parent 6c84d64e67
commit ad0be471ce
4 changed files with 121 additions and 61 deletions
+3
View File
@@ -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,