Skip to content

fix(styled): add default type for Extra to fix Intellisense in JS#307

Open
GertSallaerts wants to merge 1 commit into
nandorojo:masterfrom
ambassify:fix/styled-in-js
Open

fix(styled): add default type for Extra to fix Intellisense in JS#307
GertSallaerts wants to merge 1 commit into
nandorojo:masterfrom
ambassify:fix/styled-in-js

Conversation

@GertSallaerts

Copy link
Copy Markdown

When I use the styled function in a JavaScript file instead of a TypeScript file as shown below, Intellisense breaks in VSCode because the Extra type gets evaluated to undefined. Adding this default type fixes that and shouldn't have any negative impact on TypeScript users as far as I can tell.

styled(MyComponent)({
    fontSize: 12
});
Before After
image image

@vercel

vercel Bot commented May 15, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dripsy ❌ Failed (Inspect) May 15, 2024 8:40am

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.

1 participant