We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e40c1 commit be763f3Copy full SHA for be763f3
docs/new/typescript-3.8.md
@@ -30,16 +30,16 @@ function doThingBetter(options: Options) {
30
31
遗憾的是,这仅是因为一个被称之为「导入省略」的功能而起作用。当 TypeScript 输出一个 JavaScript 文件时,TypeScript 会识别出 `Options` 仅仅是当作了一个类型来使用,它将会删除 `Options`
32
33
-```ts
+```JavaScript
34
// ./foo.js
35
-export function doThing(options: Options) {
+export function doThing(options) {
36
// ...
37
}
38
39
// ./bar.js
40
import { doThing } from './foo.js';
41
42
-function doThingBetter(options: Options) {
+function doThingBetter(options) {
43
// do something twice as good
44
doThing(options);
45
0 commit comments