Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Self-referencing classes #71

Closed
alexeagle opened this issue Sep 1, 2015 · 1 comment · Fixed by #73
Closed

Self-referencing classes #71

alexeagle opened this issue Sep 1, 2015 · 1 comment · Fixed by #73
Assignees

Comments

@alexeagle
Copy link
Contributor

in provide_single_class.js

/**
 * @param {foo.bar.Baz} b
 * @return {boolean}
 */
foo.bar.Baz.prototype.equals = function(b) {
  return false;
};

emits

declare namespace ಠ_ಠ.cl2dts_internal.foo.bar {
  class Baz {
    field : string ;
    equals (b : foo.bar.Baz ) : boolean ;
    method (a : string ) : number ;
    static staticMethod (a : string ) : number ;
  }
}

the Baz name is not correctly qualified, should probably be bare Baz or maybe fully-qualified with the look of disapproval

@alexeagle alexeagle self-assigned this Sep 1, 2015
@alexeagle
Copy link
Contributor Author

Actually, that doesn't cause a problem.
The bug is when the class has a nested class which is referenced in a type signature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant