English 中文(简体)
缩略语 国际通信组织不建议使用全球名称空间。
原标题:VS Code Typescript IntelliSense does not suggest namespace from global.d.ts

If I declare the namespace globally for an application, I can use it (it works without compilation errors), but I won t have suggestion/autocompletion for the namespace specifically. However types from this namespace do appear in the intellisense suggestions.

换言之,我对名称空间进行分类(例如<条码>libTypes)。 没有人对此提出建议,但在我完成名称空间的打字和在名称之后添加一个标识(libTypes.)之后,开始在座标语中向我建议这一名称空间中的所有可用类型。

Example of global.d.ts
import * as _libTypes from  library/types ;
declare global {
    const libTypes: typeof _libTypes;
}

export as namespace libTypes;
export = _libTypes;
tsconfig.json
{
  "files": [
    "src/main.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ]
}
问题回答

改变ts。

tsconfig.json

{
  "files": [
    "src/main.ts"
  ],
  "include": [
    "src/**/*.d.ts",
    "types"
  ]
}




相关问题
Intellisense not showing anything I write

I am using Visual C# 2008 express. I m also running Windows 7. I created a simple form, but Intellisense doesn t show anything I wrote. I write: private RadioButton rbtn_sortLocation; And then when ...

Intellisense not working

Intellisense is not working correctly for new user Controls. Any class in the same namespace as my new class is not visible in intellisense. It compiles without any problem. I m using VS 2008.

Shortlisting Intellisense

Does anyone know if there s a way in VS 2008 to shortlist the Intellisense to show only, say, events or properties? Or is there possibly a plug-in for this? I use Intellisense over going to the ...

Intellisense for C# User Control in VB.NET project

I have created a C# user control which I want to use in VB.NET .. the control works fine, but in VB.NET the Intellisense does not show any of the C# user control function descriptions (in summary xml ...

visual studio intellisense error

template <typename T> class Test { friend Test<T> & operator * (T lhs, const Test<T> & rhs) { Test<T> r(rhs); // return r *= lhs; ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

热门标签