Interface Environment

interface Environment {
    baseUrl?: string;
    globalAPI?: boolean;
    createTrustedTypesPolicy?(policyName, policyOptions?): ITrustedTypePolicy;
    getWorker?(workerId, label): Worker | Promise<Worker>;
    getWorkerUrl?(workerId, label): string;
}

Properties

baseUrl?: string

The base url where the editor sources are found (which contains the vs folder)

globalAPI?: boolean

Define a global monaco symbol. This is true by default in AMD and false by default in ESM.

Methods

  • A web worker factory. NOTE: If getWorker is defined, getWorkerUrl is not invoked.

    Parameters

    • workerId: string
    • label: string

    Returns Worker | Promise<Worker>

  • Return the location for web worker scripts. NOTE: If getWorker is defined, getWorkerUrl is not invoked.

    Parameters

    • workerId: string
    • label: string

    Returns string