如何忽略模块类型声明文件中的错误

时间:2020-08-09 14:20:18

标签: node.js typescript npm tsc .d.ts

软件包globby中存在一些错误,这不是直接依赖项。我该如何忽略呢?

node_modules/globby/index.d.ts:6:14 - error TS1005: ';' expected.

6       | readonly string[]
                   ~~~~~~

node_modules/globby/index.d.ts:6:21 - error TS1011: An element access expression should take an argument.

6       | readonly string[]
                          

node_modules/globby/index.d.ts:7:23 - error TS1005: ',' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                            ~~~~~~

node_modules/globby/index.d.ts:7:29 - error TS1005: ',' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                  ~

node_modules/globby/index.d.ts:7:30 - error TS1109: Expression expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                   ~

node_modules/globby/index.d.ts:7:31 - error TS1005: ':' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                    ~

node_modules/globby/index.d.ts:7:55 - error TS1005: ',' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                                            ~~~~~~

node_modules/globby/index.d.ts:7:61 - error TS1005: ',' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                                                  ~

node_modules/globby/index.d.ts:7:62 - error TS1109: Expression expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                                                   ~

node_modules/globby/index.d.ts:7:63 - error TS1005: ':' expected.

7       | {files?: readonly string[]; extensions?: readonly string[]};
                                                                    ~

node_modules/globby/index.d.ts:51:30 - error TS1005: ';' expected.

51      readonly ignore?: readonly string[];
                                   ~~~~~~

node_modules/globby/index.d.ts:51:37 - error TS1011: An element access expression should take an argument.

51      readonly ignore?: readonly string[];
                                          

node_modules/globby/index.d.ts:55:1 - error TS1128: Declaration or statement expected.

55 }
   ~

node_modules/globby/index.d.ts:104:31 - error TS1005: ',' expected.

104     patterns: string | readonly string[],
                                    ~~~~~~

node_modules/globby/index.d.ts:104:37 - error TS1005: ',' expected.

104     patterns: string | readonly string[],
                                          ~

node_modules/globby/index.d.ts:118:31 - error TS1005: ',' expected.

118     patterns: string | readonly string[],
                                    ~~~~~~

node_modules/globby/index.d.ts:118:37 - error TS1005: ',' expected.

118     patterns: string | readonly string[],
                                          ~

node_modules/globby/index.d.ts:143:31 - error TS1005: ',' expected.

143     patterns: string | readonly string[],
                                    ~~~~~~

node_modules/globby/index.d.ts:143:37 - error TS1005: ',' expected.

143     patterns: string | readonly string[],
                                          ~

node_modules/globby/index.d.ts:155:31 - error TS1005: ',' expected.

155     patterns: string | readonly string[],
                                    ~~~~~~

node_modules/globby/index.d.ts:155:37 - error TS1005: ',' expected.

155     patterns: string | readonly string[],
                                          ~

node_modules/globby/index.d.ts:169:31 - error TS1005: ',' expected.

169     patterns: string | readonly string[],
                                    ~~~~~~

node_modules/globby/index.d.ts:169:37 - error TS1005: ',' expected.

169     patterns: string | readonly string[],
                                          ~

0 个答案:

没有答案