国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - typescript 使用const 報(bào)Cannot redeclare block-scoped variable
高洛峰
高洛峰 2017-06-30 09:58:05
0
2
1583

Two files in the same directory a.ts b.ts

a.ts:

const a=1;

b.ts:

const a=2;

The two files have no dependencies, I really can’t figure it out

高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗(yàn)。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項(xiàng)目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...

reply all(2)
黃舟

Because there is no import or export in your two files, so he thinks that your two files are global... and will naturally prompt this

淡淡煙草味

Because there is no closure in the file, each a is a global variable by default. You can use export to export a, then a becomes a variable in the closure.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template