mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Change type of metadata to unknown
This commit is contained in:
@@ -225,7 +225,7 @@ namespace ts.server.protocol {
|
||||
/**
|
||||
* Contains extra information that plugin can include to be passed on
|
||||
*/
|
||||
metadata?: any;
|
||||
metadata?: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -688,7 +688,7 @@ namespace ts.server {
|
||||
success,
|
||||
};
|
||||
if (success) {
|
||||
let metadata: any;
|
||||
let metadata: unknown;
|
||||
if (isArray(info)) {
|
||||
res.body = info;
|
||||
metadata = (info as WithMetadata<ReadonlyArray<any>>).metadata;
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace ts {
|
||||
/* @internal */
|
||||
export const emptyOptions = {};
|
||||
|
||||
export type WithMetadata<T> = T & { metadata?: any; };
|
||||
export type WithMetadata<T> = T & { metadata?: unknown; };
|
||||
|
||||
//
|
||||
// Public services of a language service instance associated
|
||||
|
||||
+2
-2
@@ -4689,7 +4689,7 @@ declare namespace ts {
|
||||
writeFile?(fileName: string, content: string): void;
|
||||
}
|
||||
type WithMetadata<T> = T & {
|
||||
metadata?: any;
|
||||
metadata?: unknown;
|
||||
};
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@@ -5793,7 +5793,7 @@ declare namespace ts.server.protocol {
|
||||
/**
|
||||
* Contains extra information that plugin can include to be passed on
|
||||
*/
|
||||
metadata?: any;
|
||||
metadata?: unknown;
|
||||
}
|
||||
/**
|
||||
* Arguments for FileRequest messages.
|
||||
|
||||
+1
-1
@@ -4689,7 +4689,7 @@ declare namespace ts {
|
||||
writeFile?(fileName: string, content: string): void;
|
||||
}
|
||||
type WithMetadata<T> = T & {
|
||||
metadata?: any;
|
||||
metadata?: unknown;
|
||||
};
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
|
||||
Reference in New Issue
Block a user