-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type script #17
Type script #17
Conversation
39bf64d
to
c8d2143
Compare
Neat, let me know when you think this is done. Aside: I'd very much prefer no semi-colons -- they're not very useful in JS, and TS has even fewer corner cases where |
I am facing a problem with importing a class from Do you know what is going on here? |
This comment has been minimized.
This comment has been minimized.
This is solved in bf753d4 🚀 |
@pfitzseb This is ready to get merged for now. 😃
PS: the name of the package doesn't match the name of the repository. If this isn't intentional, we should fix it. |
e692128
to
16dd7d0
Compare
3339a3b
to
053b0ec
Compare
My thoughts on this:
|
Thank you for your opinion. Regarding your first point, I totally get your point regarding small PRs and I agree with it, however, this PR meant to fix the performance of this package, and for that, I had to rewrite different sections of the code, and edits in small chunks were either not possible or didn't help because of code overhaul (e.g. space-pen-views -> atom-select-list).
I want to disagree with this one though.
Read this article to know more about the advantages: |
Add dom to lib Update tsconfig.json update tsconfig import helpers option tslib deps Revert import helpers compile Update tsconfig.json
bd320dd
to
7fa86c0
Compare
|
window.measure
I'm getting 0ms on both of my machines as well now -- is that just because package activation is deferred because of the activation hook? |
Yes. That is why. But before 525aee1 still I got a very good loading time. My inline benchmark code still gives 5ms. Probably Atom cannot measure the correct activation time especially when it is deferred. My Github action shows The package loads much faster (compared to master branch) because:
|
@pfitzseb Do you need anything else here from me? |
Ready to get merged - Tested and works as expected
Converted the codebase (JS/CS) to TypeScript.
Changed atom-space-pen-views to atom-select-list
Defining Selector Class instead of module
using a StatusBar Class instead of module
Fixes Uncaught TypeError: Cannot read property 'nodeName' of undefined #15 and Fixes Uncaught TypeError: Cannot read property 'webkitMatchesSelector' of undefined #16
Optimized the code.
build using Webpack
Loading time is cut from 71ms to 0ms!
before:
after:
/src
includes the typescript source files (input)./lib
includes the compiled javascript (output).