Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何在 TypeScript 中从字符串数组创建类型?
基于字符串数组创建 TypeScript 类型的最佳方法是什么 我的版本是2 6 2 该数组很长 我不想通过在枚举声明中复制字符串值来重复自己 我想做的是这样的 const colors red orange yellow green bl
typescript
typescript20
在 Typescript 2.0 中搜索类型定义的规范方法
自从 Typescript 2 0 取代打字以来 我们应该使用 https blogs msdn microsoft com typescript 2016 06 15 the future of declaration files npm
typescript
npm
typescript20
检查属性是否用特定注释修饰 - Typescript
如何确定特定属性是否用特定注释修饰 例如这个类 class A DecoratedWithThis thisProp number 我怎么知道thisProp装饰有DecoratedWithThis 我的用例 我使用另一个文件中的类来生成属
typescript
typescript20
如何使用@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
如何在类型方法中使用另一个类方法和 this 上下文?
我想在 TypeScript 中进一步重写 JavaScript 方法 我很想在课堂上这样做 如下所示 export default class export default class GroupItemMetadataProvider1
javascript
typescript
This
domevents
typescript20
打字稿错误“无法写入文件...因为它会覆盖输入文件。”
在 Visual Studio 2015 Update 3 中的 Typescript 2 2 1 项目中 我在错误列表中收到数百个错误 例如 无法写入文件 C my project node modules buffer shims in
VisualStudio
typescript
visualstudio2015
typescript20
TypeScript 编译器参数“skipLibCheck”的用法
我一直在研究进一步的解释跳过库检查TypeScript 编译器参数来确定将此设置为的安全性true 我找到的最深入的解释如下 新 skipLibCheck TypeScript 2 0 添加了一个新的 skipLibCheck 编译器选项
typescript
typescripttypings
typescript20
如何在节点模块包上跳过打字稿的 noImplicitAny=true 规则?
我正在使用 Typescript 2 和 Webpack 2 构建 Angular 2 应用程序 作为加载器 我使用 Awesome typescript loader 我在 tsconfig json 中设置了 noImplicitAny
angular
typescript
WEBPACK
typescript20
webpack2
如何在 Typescript 中创建抽象工厂模式?
我正在尝试在 Typescript 中实现标准抽象工厂模式 但编译器不合作 这是我的代码的简化版本 abstract class Model class User extends Model abstract class ModelFact
typescript
factory
typescript20
Angular2单元测试-为什么nativeElement有空的CSSStyleDeclaration
我正在尝试测试一个简单的标头组件 它有一个按钮 当聚焦时 仅使用 css 可见性属性打开一个下拉列表 这是 HTML
unittesting
angular
karmajasmine
typescript20
angular2testing
如何克隆 TypeScript 对象数组?
我尝试了这种方法 this plans this plansCopy this plans 似乎它不起作用 导致返回重复 展开运算符返回数组的各个项目 如果这些已经是对象 那么它返回参考到那些物体 这是 创建新数组的部分 因此你有一个新的数
typescript
typescript20
属性“isLoading”在类型“IntrinsicAttributes & IntrinsicClassAttributes
>”上不存在 -Redux 表单
我有一个容器组件和一个表单组件 表单组件 import as React from react import reduxForm Field InjectedFormProps from redux form export type Log
ReactJS
typescript
reduxform
typescripttypings
typescript20
错误 TS4058:导出函数的返回类型具有或正在使用外部模块 Y 中的名称 X,但无法命名
使用 tsc v2 2 2 如何修复打字稿编译器错误 错误 TS4058 导出函数的返回类型具有或正在使用名称 来自外部模块的 SomeInterface 某些路径 dist types 但不能命名 我有文件夹index ts and 某事
typescript
typescripttypings
typescript20
错误 TS2451:无法重新声明块作用域变量“$”
尝试使用 typescript 2 1 进行编译时出现以下错误 TypeScript 错误 node modules types jquery index d ts 3770 13 错误 TS2451 无法重新声明块作用域变量 不确定这意味
typescript
typescript20
安装@types/leaflet后无法访问全局L命名空间
我正在努力获取对导出命名空间的引用leaflet https www npmjs com package types leaflet我的 TypeScript 项目中的类型定义 安装类型后使用npm install save types l
typescript
leaflet
typescripttypings
typescript20
从包类型扩展命名空间
我在这里尝试从包类型扩展命名空间 typings fullcalendar
typescript
typescript20
属性不可分配给接口中的字符串索引[重复]
这个问题在这里已经有答案了 我有以下接口 export interface Meta counter number limit number offset number total number export interface Api
typescript
interface
typescript20
“this”隐式具有类型“any”,因为它没有类型注释
当我启用noImplicitThis in tsconfig json 我收到以下代码的错误 this 隐式具有类型 any 因为它没有类型 注解 class Foo implements EventEmitter on name stri
typescript
typescript20
那么属性在 void 类型上不存在,打字稿错误
Code reset let alert this AlertCtrl create buttons ok this userservice passwordreset this email then res any gt if res s
angular
typescript
typescript20
您可以声明一个允许打字稿中未知属性的对象文字类型吗?
本质上 我想确保对象参数包含所有必需的属性 但可以包含它想要的任何其他属性 例如 function foo bar baz number number return bar baz foo baz 1 other 2 但这会导致 Objec
generics
typescript
typescript20
objectliteral
1
2
3
»