more temp

This commit is contained in:
Arthur Ozga 2016-10-26 14:27:51 -07:00
parent 132b7461d5
commit ecc029fd1c
2 changed files with 9 additions and 3 deletions

View file

@ -11,9 +11,13 @@ namespace ts.codefix {
if (token.kind === SyntaxKind.Identifier && token.parent.parent.kind === SyntaxKind.HeritageClause) {
const children = (<HeritageClause>token.parent.parent).getChildren();
var hasImplements: boolean = ts.forEach(children, child => child.kind === SyntaxKind.ImplementsKeyword);
var childInterfaces = children.filter(child => child.kind === SyntaxKind.InterfaceDeclaration)
// If there is already an implements keyword, we currently have incorrect behavior.
// For now, we suppress the quickfix altogether.
/*
if(ts.forEach(children, child => child.kind === SyntaxKind.ImplementsKeyword)) {
return undefined;
}
*/
ts.forEach(children, child => {
if (child.kind === SyntaxKind.ExtendsKeyword) {

View file

@ -136,6 +136,7 @@ namespace ts.codefix {
return getNamedClassMemberDeclarations(classDeclaration).filter(member => getModifierFlags(member) & ModifierFlags.Abstract);
}
/*
function getMembersAndStartPosFromReference(variableDeclaration: VariableDeclaration): { startPos: number, members: string[] } {
const children = variableDeclaration.getChildren();
const variableMembers: string[] = [];
@ -157,6 +158,7 @@ namespace ts.codefix {
return { startPos: startPos, members: variableMembers };
}
*/
function getDefaultValue(kind: SyntaxKind): string {
switch (kind) {