Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Classes

Interfaces

Type aliases

Variables

Type aliases

syscallTable

syscallTable: object

Type declaration

  • close: function
      • (fileDescriptor: number): void
      • Parameters

        • fileDescriptor: number

        Returns void

  • error: function
      • (message: string): void
      • Parameters

        • message: string

        Returns void

  • exec: function
      • (pathArray: string[], args: string[]): Promise<number>
      • Parameters

        • pathArray: string[]
        • Rest args: string[]

        Returns Promise<number>

  • exit: function
      • (message: string): void
      • Parameters

        • message: string

        Returns void

  • fork: function
      • (): Promise<number>
      • Returns Promise<number>

  • import: function
      • (pathArray: string[], variableName: string): Promise<any>
      • Parameters

        • pathArray: string[]
        • variableName: string

        Returns Promise<any>

  • open: function
      • (pathArray: string[]): Promise<number>
      • Parameters

        • pathArray: string[]

        Returns Promise<number>

  • read: function
      • (fileDescriptor: number): Promise<ArrayBuffer>
      • Parameters

        • fileDescriptor: number

        Returns Promise<ArrayBuffer>

  • write: function
      • (fileDescriptor: number, data: ArrayBuffer): Promise<ArrayBuffer>
      • Parameters

        • fileDescriptor: number
        • data: ArrayBuffer

        Returns Promise<ArrayBuffer>

Variables

Const AsyncFunction

AsyncFunction: any = Object.getPrototypeOf(async function(){}).constructor

Let fileDescriptorCounter

fileDescriptorCounter: number = 0

Const script

script: "// wrap onmessage setup in function so that variables created (id, calls, etc.)// aren't in worker script scope.onmessage = function () {const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;let id = 0;const calls = {};const system = new Proxy({}, {get: function (obj, sysCallName) {// Make a system call "prop"return (...args) => {return new Promise((resolve, reject) => {id ++;calls[id] = resolve;postMessage([id, sysCallName].concat(args));});}}});function initialize(e) {let func = new AsyncFunction('system', e.data);func.bind(this)(system).then(() => {return system.exit("");}).catch((error) => {system.error(error.toString());console.log(error);});messageHandler = handleCallReturn;}function handleCallReturn(e) {let id = e.data[0];let data = e.data[1];let sysCall = calls[id];if (sysCall){delete calls[id];sysCall(data);}}let messageHandler = initialize;return messageHandler;}();" = `// wrap onmessage setup in function so that variables created (id, calls, etc.)// aren't in worker script scope.onmessage = function () {const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;let id = 0;const calls = {};const system = new Proxy({}, {get: function (obj, sysCallName) {// Make a system call "prop"return (...args) => {return new Promise((resolve, reject) => {id ++;calls[id] = resolve;postMessage([id, sysCallName].concat(args));});}}});function initialize(e) {let func = new AsyncFunction('system', e.data);func.bind(this)(system).then(() => {return system.exit("");}).catch((error) => {system.error(error.toString());console.log(error);});messageHandler = handleCallReturn;}function handleCallReturn(e) {let id = e.data[0];let data = e.data[1];let sysCall = calls[id];if (sysCall){delete calls[id];sysCall(data);}}let messageHandler = initialize;return messageHandler;}();`

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc