-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set up TypeScript #5
Labels
env
Development environment changes not covered by other tags
Milestone
Comments
davidstraka2
added
the
env
Development environment changes not covered by other tags
label
Nov 29, 2020
davidstraka2
added a commit
that referenced
this issue
Feb 23, 2021
Basic setup utilizing TypeScript project references (see https://stackoverflow.com/a/55000497 for more information). The compiler rules are very lax for now. Atom and Jasmine typings have been installed. CI workflow has been updated. As Atom's included test runner expects tests in the /spec directory (see https://flight-manual.atom.io/hacking-atom/sections/writing-specs/#create-a-new-spec), and the TypeScript compiler cannot modify import paths (see https://stackoverflow.com/a/52731590), the TypeScript source files must follow the directory structure (possibly inside some directories) of the output with the /spec directory. Hence /src/spec/ and /src/lib/ instead of e.g. /src/ and /test/. As Atom's included test runner uses Jasmine 1.3 (very old version, which lacks async/await support; see https://flight-manual.atom.io/hacking-atom/sections/writing-specs/#customizing-your-test-runner), using Atom's global waitsForPromise seems to be the best way (recommended by the official guide). However, even with the Atom typings installed, there is a compiler error "Cannot find name 'waitsForPromise'.ts(2304)". For now, a temporary hotfix in form of "any" declaration has been used.
davidstraka2
added a commit
that referenced
this issue
Feb 23, 2021
Basic setup utilizing TypeScript project references (see https://stackoverflow.com/a/55000497 for more information). The compiler rules are very lax for now. Atom and Jasmine typings have been installed. CI workflow has been updated. As Atom's included test runner expects tests in the /spec directory (see https://flight-manual.atom.io/hacking-atom/sections/writing-specs/#create-a-new-spec), and the TypeScript compiler cannot modify import paths (see https://stackoverflow.com/a/52731590), the TypeScript source files must follow the directory structure (possibly inside some directories) of the output with the /spec directory. Hence /src/spec/ and /src/lib/ instead of e.g. /src/ and /test/. As Atom's included test runner uses Jasmine 1.3 (very old version, which lacks async/await support; see https://flight-manual.atom.io/hacking-atom/sections/writing-specs/#customizing-your-test-runner), using Atom's global waitsForPromise seems to be the best way (recommended by the official guide). However, even with the Atom typings installed, there is a compiler error "Cannot find name 'waitsForPromise'.ts(2304)". For now, a temporary hotfix in form of "any" declaration has been used.
davidstraka2
added a commit
that referenced
this issue
Feb 23, 2021
Repository owner
locked as resolved and limited conversation to collaborators
Feb 23, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Set up TypeScript for package development.
The text was updated successfully, but these errors were encountered: