Add documentation for ns.pid

This commit is contained in:
omuretsu
2022-12-13 09:08:23 -05:00
parent 52034ccedc
commit 1dec0d00bd
6 changed files with 19 additions and 16 deletions

View File

@@ -91,10 +91,9 @@ export const enums: NSEnums = {
LocationName,
};
export type NSFull = Readonly<NS & INetscriptExtra>;
export type NSFull = Readonly<Omit<NS & INetscriptExtra, "pid" | "args">>;
const base: InternalAPI<NS> = {
args: [],
export const ns: InternalAPI<NSFull> = {
enums,
singularity: NetscriptSingularity(),
gang: NetscriptGang(),
@@ -1898,14 +1897,10 @@ const base: InternalAPI<NS> = {
}
},
flags: Flags,
};
// add undocumented functions
export const ns = {
...base,
...NetscriptExtra(),
};
// add undocumented functions
export const wrappedNS = wrapAPILayer({} as ExternalAPI<NSFull>, ns, []);
// Figure out once which layers of ns have functions on them and will need to be stamped with a private workerscript field for API access