Skip to content

chore: Update @types/csso and correct types#1910

Merged
SethFalco merged 1 commit intosvg:mainfrom
jdufresne:up-csso-type
Dec 27, 2023
Merged

chore: Update @types/csso and correct types#1910
SethFalco merged 1 commit intosvg:mainfrom
jdufresne:up-csso-type

Conversation

@jdufresne
Copy link
Copy Markdown
Contributor

Follow upstream commit:
DefinitelyTyped/DefinitelyTyped@394c175

Can remove the ts-ignore when importing specificity.

The specificity function return a 3-tuple, so update the type alias in lib/types.d.ts.

@jdufresne jdufresne changed the title Update @types/csso and correct types chore: Update @types/csso and correct types Dec 27, 2023
Follow upstream commit:
DefinitelyTyped/DefinitelyTyped@394c175

Can remove the ts-ignore when importing specificity.

The specificity function return a 3-tuple, so update the type alias in
lib/types.d.ts.
@SethFalco
Copy link
Copy Markdown
Member

SethFalco commented Dec 27, 2023

Thanks for the fix! I was looking into making a similar pull request a few weeks ago, but shelved it as DefinitelyTyped doesn't accept types for internal APIs, which the specificity function isn't documented. 🤔

We do not support exposing undocumented internal implementation details of libraries in .d.ts files.

https://definitelytyped.github.io/guides/contributing.html

Might be that I was wrong and it's meant to be public, but in any case, happy to run with this now that it's defined in the types. 🎉

Btw, I rebased your changes to make csso and ^@types/csso both anchor to minor version.

@SethFalco SethFalco merged commit 4768af6 into svg:main Dec 27, 2023
@jdufresne jdufresne deleted the up-csso-type branch December 27, 2023 13:22
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.

2 participants