Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

stof
Copy link
Contributor

@stof stof commented Sep 3, 2025

Closes sass/sass#4037

The @sass/types package will be published with version numbers in sync with the sass and sass-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 and sass-embedded still ship with type declarations included so that they can be supported natively by typescript (and IDEs).


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
Copy link
Contributor Author

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)

@@ -0,0 +1,15 @@
{
"name": "sass-types",
Copy link
Contributor Author

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.

Copy link
Contributor

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.

@stof stof changed the title Publish a sass-types package with the types of the shared JS API Publish a @sass/types package with the types of the shared JS API Sep 18, 2025
@stof
Copy link
Contributor Author

stof commented Sep 18, 2025

@nex3 I updated the PR to use @sass/types as package name.

@nex3 nex3 merged commit 307226a into sass:main Sep 19, 2025
39 checks passed
@stof stof deleted the type_publish branch September 20, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] publish a sass-types package with type declarations for the standardized JS API
2 participants