We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
> ```tsx
// code.tsx import React, { useState, useEffect } from 'react' const Home = () => { const [modal2Value, setModal2Value] = useState('abc') const selectedData: [ { label: string; value: string | number }, { label: string; value: string | number }, ] = [ { label: 'xx', value: 123 }, { label: 'zz', value: '234' }, ] useEffect(() => { setModal2Value(selectedData[0].value as string) // this code throw error }, []) return <h1>{modal2Value}</h1> } export default Home // index.ts const recast = require('recast'); const fs = require('fs'); const mCode = fs.readFileSync('./code.tsx',{encoding:'utf-8'}); const tsAst = recast.parse(mCode, { parser: require("recast/parsers/typescript") }); console.log(tsAst) ฉันควรใช้การแยกวิเคราะห์แบบใด ? ขอบคุณ
// code.tsx import React, { useState, useEffect } from 'react' const Home = () => { const [modal2Value, setModal2Value] = useState('abc') const selectedData: [ { label: string; value: string | number }, { label: string; value: string | number }, ] = [ { label: 'xx', value: 123 }, { label: 'zz', value: '234' }, ] useEffect(() => { setModal2Value(selectedData[0].value as string) // this code throw error }, []) return <h1>{modal2Value}</h1> } export default Home
// index.ts const recast = require('recast'); const fs = require('fs'); const mCode = fs.readFileSync('./code.tsx',{encoding:'utf-8'}); const tsAst = recast.parse(mCode, { parser: require("recast/parsers/typescript") }); console.log(tsAst)
ฉันควรใช้การแยกวิเคราะห์แบบใด ? ขอบคุณ
Originally posted by @phitattoo in #1258 (comment)
The text was updated successfully, but these errors were encountered:
> ```tsx // code.tsx import React, { useState, useEffect } from 'react' const Home = () => { const [modal2Value, setModal2Value] = useState('abc') const selectedData: [ { label: string; value: string | number }, { label: string; value: string | number }, ] = [ { label: 'xx', value: 123 }, { label: 'zz', value: '234' }, ] useEffect(() => { setModal2Value(selectedData[0].value as string) // this code throw error }, []) return <h1>{modal2Value}</h1> } export default Home // index.ts const recast = require('recast'); const fs = require('fs'); const mCode = fs.readFileSync('./code.tsx',{encoding:'utf-8'}); const tsAst = recast.parse(mCode, { parser: require("recast/parsers/typescript") }); console.log(tsAst) ฉันจำได้ว่าเป็นการวิเคราะห์แบบใด ? ขอบคุณ โพสต์ดั้งเดิมโดย@phitattooใน#1258 (ความคิดเห็น)
// code.tsx import React, { useState, useEffect } from 'react' const Home = () => { const [modal2Value, setModal2Value] = useState('abc') const selectedData: [ { label: string; value: string | number }, { label: string; value: string | number }, ] = [ { label: 'xx', value: 123 }, { label: 'zz', value: '234' }, ] useEffect(() => { setModal2Value(selectedData[0].value as string) // this code throw error }, []) return <h1>{modal2Value}</h1> } export default Home // index.ts const recast = require('recast'); const fs = require('fs'); const mCode = fs.readFileSync('./code.tsx',{encoding:'utf-8'}); const tsAst = recast.parse(mCode, { parser: require("recast/parsers/typescript") }); console.log(tsAst) ฉันจำได้ว่าเป็นการวิเคราะห์แบบใด ? ขอบคุณ
ฉันจำได้ว่าเป็นการวิเคราะห์แบบใด ? ขอบคุณ
โพสต์ดั้งเดิมโดย@phitattooใน#1258 (ความคิดเห็น)
Sorry, something went wrong.
No branches or pull requests
Originally posted by @phitattoo in #1258 (comment)
The text was updated successfully, but these errors were encountered: