We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeScript Version:
1.8.10
Code
export class BaseLayoutModel extends BaseModel { constructor(attributes?: any, options?: any) { super(attributes, options); } } export class BaseModel extends Backbone.Model { constructor(attributes?: any, options?: any) { super(attributes, options); } destroy(options?: Backbone.ModelDestroyOptions): any { const opts = _.extend({ contentType: "application/json", dataType: "text" }, options || {}); super.destroy(opts); } }
Expected behavior:
Actual behavior: Runtime error. BaseModel is undefined
The text was updated successfully, but these errors were encountered:
in your code BaseModel is declared lexically after BaseLayoutModel
BaseModel
BaseLayoutModel
in the compiled code it means that BaseModel is used before being initialized
try swapping the declarations (BaseModel class should come first)
Sorry, something went wrong.
I know about “why it failed”. But this code translated to JS without any errors.
Duplicate of #4341 and #5207 which should be fixed by #4343
No branches or pull requests
TypeScript Version:
1.8.10
Code
Expected behavior:
Actual behavior:
Runtime error. BaseModel is undefined
The text was updated successfully, but these errors were encountered: