-
Notifications
You must be signed in to change notification settings - Fork 62
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
Generate ".d.ts" definition files for Stylable stylesheets #1766
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tomrav
added
feature
New syntax feature or behavior
tooling
CLI, stylable-scripts boilerplate
labels
Apr 22, 2021
- add intial implementation of source maps for .d.ts
This comment has been minimized.
This comment has been minimized.
Add testkit for generate-dts
closes: #351 |
add support for parsing states
idoros
reviewed
May 31, 2021
barak007
reviewed
Jun 6, 2021
- move ts testkit to e2e-test-kit - move dom-test-kit compliance tests - extracted .d.ts and sourcemap generation from createModuleSource - ts testkit can now link to project node_modules
idoros
reviewed
Jun 9, 2021
Co-authored-by: Ido Rosenthal <[email protected]>
idoros
reviewed
Jun 9, 2021
Co-authored-by: Ido Rosenthal <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By generating a
.d.ts
file for every component we aim to improve the type checking of components and how they use the inner parts of stylesheets.These
.d.ts
files can validate the following:classes
- check that used classes exist on the imported stylesheetstates
- and their values are checked against the class that defined themvariable/keyframes
- are checked to exist in the stylesheetstVars
- checked that they exist and display value generated in build-timeExecution flow will be using CLI in watch mode, and adding the generated file to the project
.gitignore
. These should be published alongside any.st.css
file.Tasks:
.d.ts
for better validation and completion when consuming.st.css
stylesheets in TypeScript.d.ts
files to allow ctrl+click to source (.st.css
)StylableDOMUtil
to not require thecssStates
function, but to instead use stylesheet namespace and generate states itselfBlocked by #1743Resolves #351