如何通过简单的功能将波斯语/阿拉伯数字转换为英文数字?
arabicNumbers = ["?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]
persianNumbers = ["?", "?", "?", "?", "?", "?", "?", "?", "?", "?"]
Run Code Online (Sandbox Code Playgroud)
它是相同的模式,但代码页是不同的.
我跑步时有问题 tsc
error TS5055: Cannot write file 'index.d.ts' because it would overwrite input file.
Run Code Online (Sandbox Code Playgroud)
我的tsconfig.json:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"newLine": "LF",
"preserveConstEnums": true,
"pretty": true,
"experimentalDecorators": true
},
"exclude": [
"node_modules",
"typings"
]
}
Run Code Online (Sandbox Code Playgroud)
该问题在以下情况下得以解决:
index.ts在tsconfigtsc index.tsdeclaration在关闭tsconfigindex为另一个名称!
例如,在package.json中更改打字稿主文件时,我遇到了相同的问题:将index.ts重命名为foo.ts
更改package.json为
"typescript": {
"main": "foo.ts"
}
Run Code Online (Sandbox Code Playgroud)
tsc错误:
error TS5055: Cannot write file 'index.d.ts' because it would overwrite input file. …Run Code Online (Sandbox Code Playgroud)