Skip to content

Commit f74872d

Browse files
committed
temp
1 parent c2feab6 commit f74872d

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,9 @@ namespace ts {
12911291
return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol);
12921292
}
12931293

1294-
// Resolves a qualified name and any involved aliases
1294+
/**
1295+
* Resolves a qualified name and any involved aliases.
1296+
*/
12951297
function resolveEntityName(name: EntityNameOrEntityNameExpression, meaning: SymbolFlags, ignoreErrors?: boolean, dontResolveAlias?: boolean, location?: Node): Symbol | undefined {
12961298
if (nodeIsMissing(name)) {
12971299
return undefined;

src/services/codefixes/changeExtendsToImplementsFix.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ namespace ts.codefix {
1010

1111
if (token.kind === SyntaxKind.Identifier && token.parent.parent.kind === SyntaxKind.HeritageClause) {
1212
const children = (<HeritageClause>token.parent.parent).getChildren();
13+
14+
var hasImplements: boolean = ts.forEach(children, child => child.kind === SyntaxKind.ImplementsKeyword);
15+
16+
var childInterfaces = children.filter(child => child.kind === SyntaxKind.InterfaceDeclaration)
17+
1318
ts.forEach(children, child => {
1419
if (child.kind === SyntaxKind.ExtendsKeyword) {
20+
// TODO: (arozga) why is there a space before implements
1521
textChanges.push({ newText: " implements", span: { start: child.pos, length: child.end - child.pos } });
1622
}
1723
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
//// interface I { }
4+
////
5+
//// class C extends I {[|
6+
//// |]}
7+
8+
verify.codeFixAtPosition(`f1(){
9+
throw new Error('Method not Implemented');
10+
}
11+
`);

0 commit comments

Comments
 (0)