-
Notifications
You must be signed in to change notification settings - Fork 369
Publish a @sass/types
package with the types of the shared JS API
#2639
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
Conversation
|
||
This package is a dual-publish of the [Sass JS API](https://sass-lang.com/documentation/js-api/) | ||
types. The `sass` and `sass-embedded` packages **still contain types**. This package is for | ||
users who _only_ need the Sass JS types (such as for `@types/gulp-sass`). It is published |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@types/gulp-sass
does not use this yet, but I will use it once published to implement the type declarations for gulp-sass 6.x which uses the modern JS API (types for gulp-sass 5.x are implemented with a dependency on @types/node-sass
, which was not supporting all the recent options even for the legacy API, but was at least a type-only package not forcing to install a different sass implementation than the one intended to be used)
pkg/sass-types/package.json
Outdated
@@ -0,0 +1,15 @@ | |||
{ | |||
"name": "sass-types", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let you decide whether you want it as sass-types
, sass-js-api-types
, @sass/types
or @sass/js-api-types
(or another name).
For now, I went for a sass-
prefix rather than the @sass
scope because none of the other sass packages are scoped on npm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do @sass/types
. Since we have more and more npm packages these days, it's probably a good idea to start moving towards a namespaced approach to match the standard npm style.
@sass/types
package with the types of the shared JS API
@nex3 I updated the PR to use |
Closes sass/sass#4037
The
@sass/types
package will be published with version numbers in sync with thesass
andsass-embedded
packages.This
@sass/types
package is meant to be used by packages wanting to support any implementation of the JS API when writing their type definition.Both
sass
andsass-embedded
still ship with type declarations included so that they can be supported natively by typescript (and IDEs).