error "ReferenceError: xx is not defined" when extends class
See original GitHub issuechild class extends parent, must have filename larger than parent class
otherwise error in title will happen
issue reference
https://issuetracker.google.com/issues/192152736
more description
filename: AAAA.ts
(any parent class)
filename: AAAA1.ts
(any extends the parent class)
ie:
- (child filename) AAAA1.ts > (parent filename) AAAA.ts, it works
- child filename< parent filname, it failed
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
ReferenceError : "x" is not defined. The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >"ReferenceError: this is not defined" in subclass - Stack Overflow
You need to call the super constructor: class Person extends Node { constructor() { super(); } }. For reference, I actually tested your...
Read more >"this" is not defined in constructor method of child class #1723
In a child class (that extends from a parent), if you try to access this before super() is called, iojs will throw an...
Read more >Errors | Node.js v19.3.0 Documentation
Class : ReferenceError #. Extends: <errors.Error>. Indicates that an attempt is being made to access a variable that is not defined. Such errors...
Read more >ReferenceError: "x" is not defined - JavaScript
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This problem is kicking my butt. If I had known ahead of time that
.gs
files don’t really support TypeScript, I wouldn’t have spent so many hours converting them just now.I’ve unsuccessfully tried the workarounds at https://github.com/google/clasp/blob/e851215b8abe4de282c62c4d61076c85e89a56ba/docs/typescript.md#typescript-support and https://github.com/google/clasp/issues/796#issuecomment-663966924 and am not sure what else to try at this point.
If I figure something out, I’ll post here.
my workaround: parent class should have lower alphabet order, eg: AppService extends 1AppServiceBase