Change type of metadata to unknown

This commit is contained in:
Sheetal Nandi
2018-11-06 18:45:08 -08:00
parent 448f385e3c
commit f0f02754f3
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ namespace ts.server.protocol {
/**
* Contains extra information that plugin can include to be passed on
*/
metadata?: any;
metadata?: unknown;
}
/**
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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;