Interface Environment

interface Environment {
    baseUrl?: string;
    globalAPI?: boolean;
    createTrustedTypesPolicy?(
        policyName: string,
        policyOptions?: ITrustedTypePolicyOptions,
    ): ITrustedTypePolicy;
    getWorker?(
        workerId: string,
        label: string,
    ): Worker | Promise<Worker>;
    getWorkerUrl?(workerId: string, label: string): 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§

§

createTrustedTypesPolicy?(
    policyName: string,
    policyOptions?: ITrustedTypePolicyOptions,
): ITrustedTypePolicy

Create a trusted types policy (same API as window.trustedTypes.createPolicy)

§

getWorker?(
    workerId: string,
    label: string,
): Worker | Promise<Worker>

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

§

getWorkerUrl?(workerId: string, label: string): string

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