Skip to content

Commit

Permalink
remove maybeEmitFakeConstructors() - see issue dart-archive#82
Browse files Browse the repository at this point in the history
  • Loading branch information
timmaffett committed Apr 29, 2022
1 parent 8253a72 commit 765ab69
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,6 @@ export default class DeclarationTranspiler extends base.TranspilerBase {
this.emit(')');
}

/**
* Emit fake constructors to placate the Dart Analyzer for JS Interop classes.
*/
maybeEmitFakeConstructors(decl: ts.Node) {
if (ts.isClassDeclaration(decl)) {
// Required to avoid spurious dart errors involving base classes without
// default constructors.
this.emit('// @Ignore\n');
this.fc.visitTypeName(decl.name);
this.emit('.fakeConstructor$()');
if (this.extendsClass) {
// Required to keep the Dart Analyzer happy when a class has subclasses.
this.emit(': super.fakeConstructor$()');
}
this.emit(';\n');
}
}

private visitName(name: ts.PropertyName|ts.BindingName) {
if (base.getEnclosingClass(name) != null) {
this.visit(name);
Expand Down

0 comments on commit 765ab69

Please sign in to comment.