Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
TypeORM 在存储库类型上抛出“类型实例化过深且可能无限。ts(2589)”错误
更新后至VSCode 2019 年 8 月 版本 1 38 和 Typescript 3 6 https code visualstudio com updates v1 38 typescript 36我得到了很多Type instant
typescript
typescripttypings
TypeORM
typescript36
使用类型作为参数 Typescript
如何在 Typescript 中使用类型作为参数 type myType const passingType t Type gt const x t passingType myType 我收到 TS 错误 t 指的是一个值 但在这里被用作
typescript
typescripttypings
更窄的类型不能分配给其他类型
有两种类型 type ExcludeString
typescript
typescripttypings
typescriptgenerics
类型“Request
”上不存在属性“”
当试图延长Request包中的接口express要添加一些自定义属性 我收到以下打字稿错误 TS2339 Property does not exist on type Request
javascript
typescript
Express
typescripttypings
在 TypeScript 中,如何引用属于联合类型一部分的类型?
我在 TypeScript 中为操作定义了一个联合类型 type Action type reset type add payload number type minus payload number 在某些函数中 我想引用联合类型的一部分
typescript
typescripttypings
TypeScript:在对象上强制使用单个动态键
有没有办法为具有以下属性的对象编写接口single动态命名的键 我能够编写一个接受任意数量的动态命名键的接口 但我想将其限制为只有一个 让我们从一些基础知识开始 然后逐步解决我的问题 在下面的接口中 对象只能有一个键 并且它被命名为 id
typescript
typescripttypings
重新声明第 3 方库中不正确的打字稿类型
我正在使用带有 types winston 类型的winston 3 0 这些类型尚未完全兼容 并且我遇到了类型中的错误 我不知道如何纠正 这是我的代码 记录器 ts export function middleware express H
typescript
npm
typescripttypings
TypeScript:如何建模 json 对象
我想输入一个变量 该变量应该是能够使用 JSON stringify 序列化的对象 我找到了这个定义 https github com Microsoft TypeScript issues 15225 issuecomment 29471
json
typescript
typescripttypings
如何使用@types/express-session?
当我写这个时 import Request from express serve static core router post req Request res next gt req session user user tsc给我一个错误
typescript
typescripttypings
typescript20
expresssession
TypeScript D3 v4 导入不起作用
我正在尝试在 D3 之上构建一个小型 JS 库来绘制折线图 我对整个场景相当陌生 但我认为跳入 深渊 是最好的学习方式 这是我的内容package json name d3play02 version 1 0 0 description m
javascript
d3js
typescript
typescripttypings
TypeScript 编译器参数“skipLibCheck”的用法
我一直在研究进一步的解释跳过库检查TypeScript 编译器参数来确定将此设置为的安全性true 我找到的最深入的解释如下 新 skipLibCheck TypeScript 2 0 添加了一个新的 skipLibCheck 编译器选项
typescript
typescripttypings
typescript20
使用 React、Typescript 和 Webpack 显示静态图像
我正在尝试使用 webpack 和 webpack dev server 在 React 组件中显示图像 作为项目的一部分 到目前为止我已经完成了以下步骤 使用 npm 安装文件加载器 更新了 webpack config js 以添加图像
ReactJS
WEBPACK
typescripttypings
webpackfileloader
Typescript 为具有动态和静态键的对象创建接口
我正在尝试学习打字稿 但在界面方面遇到了障碍 我有一个想要保存的对象token和一个route如下 const obj token thisismytoken path to somewhere 我在这里遇到的问题是 如何生成该对象的接口
typescript
interface
typescripttypings
使用 Typescript 在 Material-UI 中的 createMuiTheme 中向背景属性添加属性
我正在尝试在 createMuiTheme 中添加一个新属性 但 Typescript 不让我这样做 我按照这里的说明进行操作 https next material ui com guides typescript customizati
javascript
ReactJS
typescript
materialui
typescripttypings
避免在 switch 内进行打字稿转换
考虑以下代码 interface FooBarTypeMap FOO FooInterface BAR BarInterface type FooBarTypes FOO BAR export interface FooBarAction
typescript
casting
typescripttypings
typescriptgenerics
基于嵌套对象内属性的 Typescript Union
我正在尝试根据对象中的嵌套属性创建联合类型 请参阅下面的示例 type Foo abilities canManage boolean type Bar abilities canManage boolean extraProp numbe
typescript
typescripttypings
reacttypescript
如何在 VS Code 中使用 Typescript 定义为我自己的 Javascript 服务获取 Intellisense?
我正在使用 SailsJS 开发后端服务器 它基本上将所有模型帮助程序服务以及我自己的服务注入到全局命名空间中 如果我能够获得这些服务的 Intellisense 那将对我大有裨益 我首先设置typings并安装了 lodash 和 nod
javascript
typescript
IntelliSense
VisualStudioCode
typescripttypings
“字符串”类型的参数不可分配给字符串常量联合类型的参数[重复]
这个问题在这里已经有答案了 我再次在这里寻求有关 Typescript 启发式的一些指导 我在编写类型保护时遇到了麻烦 因为 Typescript 在比较时想要太窄 考虑以下场景 或打字稿游乐场 https www typescriptla
typescript
typescripttypings
node_modules/@types/react-dom/... 处出现错误。后续变量声明必须具有相同的类型。变量“a”
我已经安装了 types react dom 以及 typescript types react 和 types meteor 但是当我尝试从命令行运行类型检查器时 出现以下错误 您可以在此处重现错误并查看我的所有配置 https gith
ReactJS
typescript
Meteor
typescripttypings
ReactDOM
typescript - 在路径中包含类型,但不编译它们
我在打字稿中遇到了问题 我有以下层次结构 types declaration1 ts declaration2 ts common utils1 ts utils2 ts tests utils1 test ts utils2 test t
typescript
typescripttypings
1
2
3
4
5
6
7
»