Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Webpack Karma Istanbul 重新映射 TypeScript
我正在开发一个客户端应用程序 但在创建正确的 Karma 配置时遇到问题 现在 我的设置如下 Webpack 使用 ts loader 编译 TypeScript 资产等 Karma 使用 webpack 插件 加载 Webpack 配置
typescript
codecoverage
WEBPACK
istanbul
如何从 webpack angular2 应用程序中的 node_modules 导入 CSS
假设我们从以下入门包开始 https github com angularclass angular2 webpack starter https github com angularclass angular2 webpack start
css
angular
typescript
npm
WEBPACK
错误 TS2322: 类型 '{ id: string; }' 不可分配给类型 'ApiModelFilter
'
我尝试定义一些过滤器 其中过滤器对象的键应该是从模型接口扩展的任何接口的键 模型接口只定义了一个id属性 当我尝试通过定义在通用类中使用 ApiModelFilter 类型时id和一个字符串作为值我从标题中得到错误 我有什么想法可以解决这个
typescript
TypeScript - 如何从事件处理程序方法访问类实例
在下面的代码片段中 我有一个TypeScript 类和实例方法buz是画布的监听器 click event this关键字在buz方法指的是事件的目标对象 画布 如何访问foo实例来自buz method class Foo constru
javascript
typescript
如何在 Angular2 中将 HTML 转换为 pdf?
我需要将动态生成的 html 表转换为 pdf 并能够打印它 我需要它在 angular2 和 Typescript 中完成 JSPDF 适用于 Angular 2 您需要从 dt 下载定义 将库导入为 import as jsPDF fr
angular
pdf
typescript
htmltopdf
Visual Studio 不显示打字稿错误
我遇到了奇怪的问题 我已经安装了 VS2013 和 typescript 当我点击保存按钮时 ts文件 调用 ts 编译器 但 VS 没有显示任何 ts 错误 如果编译器失败我只会收到一条消息 Input file contained se
visualstudio2013
typescript
如何定义对象类型的真正逻辑或(结果中不混合不同的对象键)[重复]
这个问题在这里已经有答案了 一个例子 type TA a number b number type TB a number c number d number const t1 Or
typescript
uniontypes
TypeScript 重命名变量
Anders Hejlsberg 在 Channel9 上展示了您可以使用 Visual Studio TypeScript 插件重命名多个文件中的变量 参见 视频Anders Hejlsberg 的 TypeScript 简介 http
VisualStudio
refactoring
typescript
rename
Prisma:如何找到与 id 列表匹配的所有元素?
我将 Prisma 与 NextJs 一起使用 在我的 API 中 我向后端发送与数据库中对象 ID 相对应的数字列表 举个例子 如果我收到列表 1 2 12 我想返回 id 为 1 2 或 12 的对象 这是更复杂的查询的一部分 排序 计
typescript
Nextjs
prisma
TypeScript 升级后 Promise 返回类型错误
Using typescriptv2 3 4 以下代码运行良好 getStuff Promise
typescript
es6promise
Angular - 顺序进行多个 HTTP 调用
我需要创建一个函数来顺序进行 HTTP 调用 以便使用一个调用的响应到另一个调用 例如从第一次调用中获取用户的 IP 地址 并使用该 IP 在第二次调用中注册用户 演示代码 registerUser user User this utili
angular
typescript
Observable
有没有办法在 ngFor 中声明特定类型?
我正在使用 ngFor 迭代 Angular 4 x 中特定类型 Menu 的集合 然后循环菜单对象的集合属性 菜单项 不幸的是 该属性在我的 IDE 中未知 Eclipse https en wikipedia org wiki Ecli
angular
typescript
尝试将 Google 电子表格库与 TypeScript 一起使用时出现 ERR_OSSL_UNSUPPORTED
我尝试执行此代码 从文档复制https theoephraim github io node google spreadsheet https theoephraim github io node google spreadsheet as
nodejs
typescript
spreadsheet
尝试将 Braintree-Web 集成到 Angular2 中
我正在尝试在我的 Angular2 应用程序中使用 Braintree SDK braintree web 我真的很感激任何有关如何使其发挥作用的指示 我认为这是因为我没有导入 Braintree web 模块 但我也不知道如何导入 我可以
javascript
angular
typescript
braintree
for-await-of 简单示例(打字稿)
在 typescript 2 3 中引入了一个新功能 for await of 任何人都可以发布一个简单的示例来说明如何将其与 Promise 一起使用以及其主要用例是什么 我正在研究更改日志中的示例 async function f fo
typescript
为什么 object.constructor 是一个“函数”,而不是 TypeScript 中的“可更新”?
在 TypeScript 中 我通常使用以下方式定义类类型的类型 declare type Type new args any any 例如 当类作为参数传递时可以使用它 这有点类似于Type是用C 编写的 但也可以直接实例化new操作员
types
constructor
typescript
如何通过 *ngFor 在 Angular 2 TypeScript 前端显示 json 数组
下面是 angular2 简单的前端页面 table class table tr th title th th description th tr tr td notes title td td notes body td tr tabl
json
angular
typescript
ngfor
Iterable
> 无法确认函数中的泛型 T
这是我的问题 const iterable 1 2 3 function flat
typescript
generics
typeinference
Angular2 - 如何将字符串枚举与 *ngIf 一起使用
我该如何通过enum当我使用时到一个函数 ngIf在角度 我有以下代码 export enum RoleType User User Admin Admin 组件功能 public hasAccess role RoleType check
angular
typescript
enums
angular7
使用 TypeScript 和 nodemon:语法错误:无法在模块外部使用 import 语句
我正在转换代码以使用 nodemon 来利用 TypeScript In my package json scripts serve fake api nodemon fake api server ts watch fake api se
nodejs
typescript
nodemon
«
1 ...
94
95
96
97
98
99
100