mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Re-added fourslash tests, corrected failures.
This commit is contained in:
+12
-12
@@ -11,6 +11,18 @@ module ts {
|
||||
var nextNodeId = 1;
|
||||
var nextMergeId = 1;
|
||||
|
||||
export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration {
|
||||
var declarations = symbol.declarations;
|
||||
for (var i = 0; i < declarations.length; i++) {
|
||||
var declaration = declarations[i];
|
||||
if (declaration.kind === kind) {
|
||||
return declaration;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics.
|
||||
/// If fullTypeCheck === true - then typechecker should do every possible check to produce all errors
|
||||
/// If fullTypeCheck === false - typechecker can shortcut and skip checks that only produce errors.
|
||||
@@ -570,18 +582,6 @@ module ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration {
|
||||
var declarations = symbol.declarations;
|
||||
for (var i = 0; i < declarations.length; i++) {
|
||||
var declaration = declarations[i];
|
||||
if (declaration.kind === kind) {
|
||||
return declaration;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function findConstructorDeclaration(node: ClassDeclaration): ConstructorDeclaration {
|
||||
var members = node.members;
|
||||
for (var i = 0; i < members.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user