Skip to content

[types] Add types for spaces and src exports - #668

Merged
MysteryBlokHed merged 1 commit into
mainfrom
666/fix-export-types
Aug 10, 2025
Merged

MysteryBlokHed merged 1 commit into
mainfrom
666/fix-export-types

Conversation

@MysteryBlokHed

Copy link
Copy Markdown
Member

Closes #666

This commit doesn't touch the exports for dist, it just fixes the types for spaces and src. I only specified the import property for each of the two exports, since the files use ESM exports and wouldn't work with require.

Example (from #666):

import { toPrecision } from "colorjs.io/src/util.js";

Is now typed properly.

This commit doesn't touch the exports for `dist`, it just fixes the
types for `spaces` and `src`.

Example:

```typescript
import { toPrecision } from "colorjs.io/src/util.js";
```

Is now typed properly.
@netlify

netlify Bot commented Aug 10, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit 7d9fce2
🔍 Latest deploy log https://app.netlify.com/projects/colorjs/deploys/6897f4b349c0040008f8044d
😎 Deploy Preview https://deploy-preview-668--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@MysteryBlokHed
MysteryBlokHed requested a review from lloydk August 10, 2025 01:25

@lloydk lloydk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LeaVerou LeaVerou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh nice, thanks!

You'd expect TypeScript would be smart enough to figure this out (at least for src) but nooope…

@MysteryBlokHed
MysteryBlokHed merged commit f3d4ca2 into main Aug 10, 2025
@MysteryBlokHed
MysteryBlokHed deleted the 666/fix-export-types branch August 10, 2025 13:06
@LeaVerou LeaVerou mentioned this pull request Aug 11, 2025
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.

Types not found for ./src/* and ./spaces exports

3 participants