在特定的@types文件中,三次斜杠指令失败,打字稿> = 2.4.1

时间:2017-09-21 18:06:09

标签: typescript typescript2.0

TypeScript版本:在2.3.2中成功; 2.4.0; 2.4.1失败; 2.4.2; 2.5.0; 2.5.2

代码

/* 
 * From @types/three/three-vreffect.d.ts  
 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/60e2268280174d6facc0a63da293cd4d80b45e0d/types/three/three-vreffect.d.ts
 *
 * Expected to link to the local version of this file:
 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/60e2268280174d6facc0a63da293cd4d80b45e0d/types/webvr-api/index.d.ts
 *
 * Note that types for three and webvr-api are properly installed; 
 * the typing files are the same when in successful typescript versions 
 * (e.g. 2.4.0) and in failing versions (e.g. 2.4.1). The typings are 
 * installed from NPM and are @types/three@0.84.22 and @types/webvr-api@0.0.31
 */

/// <reference types="webvr-api" />

预期行为:此文件已解决:/ myProject / node_modules / @ types / webvr-api /

实际行为:

/* Compile time errors */

ERROR in /myProject/node_modules/@types/three/three-vreffect.d.ts
(22,27): error TS2304: Cannot find name 'VRDisplay'.

ERROR in /myProject/node_modules/@types/three/three-vreffect.d.ts
(1,23): error TS2688: Cannot find type definition file for 'webvr-api'.

我认为这是打字稿的问题,而不是打字本身不正确或过时;由于Typescript中的预期更改而导致的解决方案失败只应发生在主要版本中(因为这将是一个重大变化)。

思考?我错过了什么吗?

0 个答案:

没有答案
相关问题