Non ascii char can not be use parameter type with destructuring
See original GitHub issueVerify canary release
- I verified that the issue exists in Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
Binaries:
Node: 16.14.0
npm: 8.3.1
Yarn: 3.2.0
pnpm: 6.32.4
Relevant packages:
next: 12.1.6-canary.0
react: 18.0.0
react-dom: 18.0.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
type ü = {
name: string;
value: string;
};
export const SomeComponent = ({ name, value }: ü) => {
return (
<div>
{name} {value}
</div>
);
};
Expected Behavior
Not met errors
To Reproduce
Issue Analytics
- State:
- Created a year ago
- Reactions:10
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Destructuring and parameter handling in ECMAScript 6
In the following example, we are trying to declare the variable b and refer to the existing variable f , which doesn't work....
Read more >Typing Destructured Object Parameters in TypeScript
The TypeScript compiler complains that it can't find the name pretty that is used within the function body. This is because boolean is...
Read more >let { [key]: id = 0, ...rest } = obj - Destructuring to the limit
In this case the variable userData would be an object with only the name property. Don't confuse the rest parameter with spreading. Spreading ......
Read more >Remove non-ascii character in string - javascript
This code matches all characters that are not in the ascii range and removes them. – Zaffy. Jan 7, 2017 at 10:59. 1....
Read more >2909-destructuring-assignment - The Rust RFC Book
may be used for destructuring assignment. Unlike in usual let bindings, default binding modes do not apply for the desugared destructuring assignments, as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve encountered the same problem. I hope this bug is fixed soon!
Seems related to SWC parsing indeed, it’s reproducible with SWC standalone: https://play.swc.rs/?version=1.2.170&code=H4sIAAAAAAAAA02NOw6DMBBEe59iSpCQ0vNrOAInQMkKIcW7lllQIss3S5eLxZgUdDM7em%2F17QjfDzoEA%2FBkqcaqfuG5SX2fntvlEBtj6OXEK%2B7Cq2IUS4NYJ0ysyVGErKhOELFO6hJdn%2BWedPOMIkWgfSx7nxMQDiYiZCie8%2B2%2Fl8fXHySsyoGlAAAA&config=H4sIAAAAAAAAA0WMTQrEIAxG75K1286id5hDBCctFv9IUhgR714tlu7C915ehUMsrBUyshCPS0pU%2FMMKZAOKZZcVTNf6tKEXagYUeScdiiyd%2BZSEJjUQXHRbGSWbQmYSeRHG3T9m66GQfucYKmjJdAc%2F0N7G%2FHPynaLySe0Cj9ke9LUAAAA%3D