mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Avoid using types defined in @types/trusted-types
This commit is contained in:
parent
d823366750
commit
1331522372
|
@ -34,12 +34,25 @@ declare namespace monaco {
|
|||
*/
|
||||
getWorkerUrl?(workerId: string, label: string): string;
|
||||
/**
|
||||
* Create a trust types policy (same API as window.trustedTypes.createPolicy)
|
||||
* Create a trusted types policy (same API as window.trustedTypes.createPolicy)
|
||||
*/
|
||||
createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(
|
||||
createTrustedTypesPolicy(
|
||||
policyName: string,
|
||||
policyOptions?: Options,
|
||||
): undefined | Pick<TrustedTypePolicy<Options>, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>>;
|
||||
policyOptions?: ITrustedTypePolicyOptions,
|
||||
): undefined | ITrustedTypePolicy;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicyOptions {
|
||||
createHTML?: (input: string, ...arguments: any[]) => string;
|
||||
createScript?: (input: string, ...arguments: any[]) => string;
|
||||
createScriptURL?: (input: string, ...arguments: any[]) => string;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicy {
|
||||
readonly name: string;
|
||||
createHTML?(input: string): any;
|
||||
createScript?(input: string): any;
|
||||
createScriptURL?(input: string): any;
|
||||
}
|
||||
|
||||
export interface IDisposable {
|
||||
|
|
21
src/vs/monaco.d.ts
vendored
21
src/vs/monaco.d.ts
vendored
|
@ -34,12 +34,25 @@ declare namespace monaco {
|
|||
*/
|
||||
getWorkerUrl?(workerId: string, label: string): string;
|
||||
/**
|
||||
* Create a trust types policy (same API as window.trustedTypes.createPolicy)
|
||||
* Create a trusted types policy (same API as window.trustedTypes.createPolicy)
|
||||
*/
|
||||
createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(
|
||||
createTrustedTypesPolicy(
|
||||
policyName: string,
|
||||
policyOptions?: Options,
|
||||
): undefined | Pick<TrustedTypePolicy<Options>, 'name' | Extract<keyof Options, keyof TrustedTypePolicyOptions>>;
|
||||
policyOptions?: ITrustedTypePolicyOptions,
|
||||
): undefined | ITrustedTypePolicy;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicyOptions {
|
||||
createHTML?: (input: string, ...arguments: any[]) => string;
|
||||
createScript?: (input: string, ...arguments: any[]) => string;
|
||||
createScriptURL?: (input: string, ...arguments: any[]) => string;
|
||||
}
|
||||
|
||||
export interface ITrustedTypePolicy {
|
||||
readonly name: string;
|
||||
createHTML?(input: string): any;
|
||||
createScript?(input: string): any;
|
||||
createScriptURL?(input: string): any;
|
||||
}
|
||||
|
||||
export interface IDisposable {
|
||||
|
|
Loading…
Reference in a new issue