diff --git a/.changeset/clever-clocks-yell.md b/.changeset/clever-clocks-yell.md new file mode 100644 index 000000000..e32253110 --- /dev/null +++ b/.changeset/clever-clocks-yell.md @@ -0,0 +1,5 @@ +--- +'@emotion/unitless': minor +--- + +Source code has been migrated to TypeScript. From now on type declarations will be emitted based on that, instead of being hand-written. diff --git a/packages/unitless/package.json b/packages/unitless/package.json index f2639670a..2666a94f2 100644 --- a/packages/unitless/package.json +++ b/packages/unitless/package.json @@ -4,6 +4,7 @@ "description": "An object of css properties that don't accept values with units", "main": "dist/emotion-unitless.cjs.js", "module": "dist/emotion-unitless.esm.js", + "types": "dist/emotion-unitless.cjs.d.ts", "license": "MIT", "repository": "https://github.com/emotion-js/emotion/tree/main/packages/unitless", "scripts": { diff --git a/packages/unitless/src/index.js b/packages/unitless/src/index.ts similarity index 94% rename from packages/unitless/src/index.js rename to packages/unitless/src/index.ts index 797533b59..4f1aef669 100644 --- a/packages/unitless/src/index.js +++ b/packages/unitless/src/index.ts @@ -1,4 +1,4 @@ -let unitlessKeys /*: { [key: string]: 1 } */ = { +let unitlessKeys = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, @@ -46,6 +46,6 @@ let unitlessKeys /*: { [key: string]: 1 } */ = { strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 -} +} as const export default unitlessKeys