mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' of https://github.com/microsoft/typescript into 30246
This commit is contained in:
Vendored
+2
-2
@@ -373,8 +373,8 @@ interface RegExp {
|
||||
}
|
||||
|
||||
interface RegExpConstructor {
|
||||
new (pattern: RegExp, flags?: string): RegExp;
|
||||
(pattern: RegExp, flags?: string): RegExp;
|
||||
new (pattern: RegExp | string, flags?: string): RegExp;
|
||||
(pattern: RegExp | string, flags?: string): RegExp;
|
||||
}
|
||||
|
||||
interface String {
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace ts.GoToDefinition {
|
||||
if (!symbol) {
|
||||
return getDefinitionInfoForIndexSignatures(node, typeChecker);
|
||||
}
|
||||
|
||||
|
||||
const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
|
||||
// Don't go to the component constructor definition for a JSX element, just go to the component definition.
|
||||
if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isConstructorLike(calledDeclaration))) {
|
||||
@@ -235,8 +235,7 @@ namespace ts.GoToDefinition {
|
||||
function getDefinitionFromSymbol(typeChecker: TypeChecker, symbol: Symbol, node: Node): DefinitionInfo[] | undefined {
|
||||
// There are cases when you extend a function by adding properties to it afterwards,
|
||||
// we want to strip those extra properties
|
||||
const filteredDeclarations = symbol.declarations.filter(d => !ts.isAssignmentDeclaration(d) || d === symbol.valueDeclaration)
|
||||
|
||||
const filteredDeclarations = filter(symbol.declarations, d => !isAssignmentDeclaration(d) || d === symbol.valueDeclaration) || undefined;
|
||||
return getConstructSignatureDefinition() || getCallSignatureDefinition() || map(filteredDeclarations, declaration => createDefinitionInfo(declaration, typeChecker, symbol, node));
|
||||
|
||||
function getConstructSignatureDefinition(): DefinitionInfo[] | undefined {
|
||||
|
||||
@@ -3,7 +3,7 @@ Standard output:
|
||||
node_modules/@types/react-native/index.d.ts(3425,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
node_modules/@types/react-native/index.d.ts(3438,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.
|
||||
node_modules/@types/react/index.d.ts(378,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
node_modules/@types/react/index.d.ts(377,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ node_modules/uglify-js/lib/compress.js(4229,45): error TS2554: Expected 0 argume
|
||||
node_modules/uglify-js/lib/compress.js(4340,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4638,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(4722,37): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4930,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'.
|
||||
Property '0' is missing in type 'any[]' but required in type '[RegExp, (string | undefined)?]'.
|
||||
node_modules/uglify-js/lib/compress.js(4930,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[string | RegExp, (string | undefined)?]'.
|
||||
Property '0' is missing in type 'any[]' but required in type '[string | RegExp, (string | undefined)?]'.
|
||||
node_modules/uglify-js/lib/compress.js(5094,45): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5101,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'.
|
||||
node_modules/uglify-js/lib/compress.js(5105,36): error TS2532: Object is possibly 'undefined'.
|
||||
|
||||
@@ -8,9 +8,4 @@
|
||||
//// Component.[|/*PropertyClick*/displayName|]
|
||||
|
||||
verify.goToDefinition("FunctionClick", "FunctionResult")
|
||||
|
||||
verify.goToDefinition("PropertyClick", "PropertyResult")
|
||||
|
||||
// export const Component = () => { return "OK"}
|
||||
// Component.displayName = 'Component'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user