vercel / styled-jsx

Full CSS support for JSX without compromises
http://npmjs.com/styled-jsx
MIT License
7.7k stars 262 forks source link

styled-jsx/macro.d.ts typo #821

Closed I-vasilich-I closed 1 year ago

I-vasilich-I commented 1 year ago

Do you want to request a feature or report a bug?

What is the current behavior?

/node_modules/styled-jsx/macro.d.ts' is not a module.ts(2306)

If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar

trying to use import css from "styled-jsx/macro"; with create-react-app

I believe the problem is in the typo - macro <--> marco

declare module 'styled-jsx/marco' {
  namespace marco {
    function resolve(
      chunks: TemplateStringsArray,
      ...args: any[]
    ): {
      className: string
      styles: JSX.Element
    }
  }

  export = marco
}

fixing that locally solved the problem

What is the expected behavior?

should import without errors

Environment (include versions)

Did this work in previous versions?

don't have that info, but it seams to me that this commit is related to the problem https://github.com/vercel/styled-jsx/commit/22e36bfa12fec27e9b14f5a09339a9fb249bfa7d

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 5.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: