Closed tomasdev closed 3 years ago
I’d like to understand more about the pros and cons of switching to ES6 classes. When I looked into it some time ago I read about issues that put me off, including problems with minification, performance and more (Please stop using classes in JavaScript, Classes confuse both people and machines).
Regarding 'use strict'
, I should fix that.
Closing this, as the balance (AFAIKT) does not favour switching to ES6 classes. "use strict" is now separate issue #68.
Even though there are no plans to move Samsa to TS (https://github.com/Lorp/samsa/issues/41) it would be fair if the constructor was a proper ES6 class, which would make it TypeScript-compatible.
For those wanting to use the library in TypeScript right now, they must use
// @ts-ignore
on anynew SamsaFont()
call (and perhaps elsewhere)Additionally, the library does not work under JS strict-mode (
'use strict';
)I'd like to leave this issue open until someone contributes a PR for it.