more temp
This commit is contained in:
parent
132b7461d5
commit
ecc029fd1c
2 changed files with 9 additions and 3 deletions
|
@ -11,9 +11,13 @@ namespace ts.codefix {
|
||||||
if (token.kind === SyntaxKind.Identifier && token.parent.parent.kind === SyntaxKind.HeritageClause) {
|
if (token.kind === SyntaxKind.Identifier && token.parent.parent.kind === SyntaxKind.HeritageClause) {
|
||||||
const children = (<HeritageClause>token.parent.parent).getChildren();
|
const children = (<HeritageClause>token.parent.parent).getChildren();
|
||||||
|
|
||||||
var hasImplements: boolean = ts.forEach(children, child => child.kind === SyntaxKind.ImplementsKeyword);
|
// If there is already an implements keyword, we currently have incorrect behavior.
|
||||||
|
// For now, we suppress the quickfix altogether.
|
||||||
var childInterfaces = children.filter(child => child.kind === SyntaxKind.InterfaceDeclaration)
|
/*
|
||||||
|
if(ts.forEach(children, child => child.kind === SyntaxKind.ImplementsKeyword)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
ts.forEach(children, child => {
|
ts.forEach(children, child => {
|
||||||
if (child.kind === SyntaxKind.ExtendsKeyword) {
|
if (child.kind === SyntaxKind.ExtendsKeyword) {
|
||||||
|
|
|
@ -136,6 +136,7 @@ namespace ts.codefix {
|
||||||
return getNamedClassMemberDeclarations(classDeclaration).filter(member => getModifierFlags(member) & ModifierFlags.Abstract);
|
return getNamedClassMemberDeclarations(classDeclaration).filter(member => getModifierFlags(member) & ModifierFlags.Abstract);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
function getMembersAndStartPosFromReference(variableDeclaration: VariableDeclaration): { startPos: number, members: string[] } {
|
function getMembersAndStartPosFromReference(variableDeclaration: VariableDeclaration): { startPos: number, members: string[] } {
|
||||||
const children = variableDeclaration.getChildren();
|
const children = variableDeclaration.getChildren();
|
||||||
const variableMembers: string[] = [];
|
const variableMembers: string[] = [];
|
||||||
|
@ -157,6 +158,7 @@ namespace ts.codefix {
|
||||||
|
|
||||||
return { startPos: startPos, members: variableMembers };
|
return { startPos: startPos, members: variableMembers };
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
function getDefaultValue(kind: SyntaxKind): string {
|
function getDefaultValue(kind: SyntaxKind): string {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
|
|
Loading…
Reference in a new issue