Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
错误 TS2304:找不到名称“ImageCapture”且已安装 @types/w3c-image-capture
我正在使用 Ionic 4 和 Angular 7 开发 PWA 我需要访问网络摄像头 如果存在 然后在画布中渲染 在这个过程中我使用图像捕捉 https developer mozilla org en US docs Web API I
angular
typescript
typescripttypings
imagecapture
根据 TypeScript 中的参数动态生成返回类型
我有一个函数 它接收字符串数组并返回一个对象 其键是字符串 每个值是undefined function getInitialCharacteristics names string return names reduce obj name
typescript
typescripttypings
函数参数类型取决于其他参数的类型
我正在尝试编写一个具有以下类型签名的函数 范围a是任一类型string or undefined 范围b is a string if a也是一个string 否则它是一个number 到目前为止我的方法如下 function myFunc
typescript
typescripttypings
如何将 Knockout 打字文件更新为 TypeScript 2.0 友好?
我已经开始致力于现代化knockout库的 TypeScript 声明文件由DefinitelyTyped项目 声明文件使用了一些已弃用的技术 因此 在 TypeScript 2 0 应用程序中使用它很不方便 当前声明文件包含一个名为的接口
typescript
knockoutjs
typescripttypings
typescript20
增强位于 TypeScript 中声明的命名空间中的接口
我想增强IHttpPromise
angularJS
typescript
typescripttypings
在打字稿模块内扩展全局类型(例如“Window”)
如果您使用打字稿编写并且不使用模块 则可以扩展全局Window目的 例如 这样编译 interface Window myCounter number window myCounter window myCounter 0 window m
typescript
typescripttypings
Angular 2:错误 TS2307:找不到模块“socket.io-client”
安装模块后socket io npm install socket io save 我有以下错误 错误 TS2307 找不到模块 socket io client import import as io from socket io cli
angular
typescript
Sockets
typescripttypings
如何安装自定义打字?
我创建了一个自定义类型 其中包含我想在多个 webstorm node js 项目中共享的代码 问题是我正在尝试查找概述如何在项目中包含打字的文档 我尝试使用 npm 命令 但它没有将文件夹添加到 node modules 文件夹下的 ty
nodejs
typescript
typescripttypings
如何定义一个只接受打字稿类型参数的函数?
我想定义一个函数 例如 function isNumber param param is number 如果参数可以是数字 例如number string number boolean 它可以传递给函数 如果没有 例如它的类型是string
typescript
typescripttypings
如何使用types安装jquery
used typings install jquery global typings ERR message Unable to find jquery npm in the registry Did you want to try sea
typescript
typescripttypings
处理未定义声明文件的正确方法(index.d.ts)
我收到以下错误 error TS7016 Could not find a declaration file for module react native camera Users ilja Documents Repositories
ReactJS
typescript
ReactNative
nodemodules
typescripttypings
TypeScript:接口不能同时扩展两种类型
我正在使用 TypeScript 编写一个 React 应用程序 我的组件使用material ui 我正在为 Material ui 的 Button 组件编写一个自定义包装器 它看起来像这样 import MUIButton Butto
ReactJS
typescript
typescripttypings
reactprops
typescripttypes
特定键上的部分<>
我有一个描述 mongodb 数据库数据的打字稿界面 例如 interface Foo id string name string fish id string name string 我有一种方法可以构建要插入数据库的数据 例如 func
typescript
interface
typescripttypings
找不到第三方模块的声明文件 - 如何声明和解决这些错误
我正在开发一个使用 typescript 的项目 使用 vue cli 3 0 生成 当我导入第三方模块时 出现如下错误 Could not find a declaration file for module vue slider com
typescript
vuejs2
typescripttypings
VueCli
在打字稿中为嵌套命名空间创建类型
我正在尝试为已经存在的库创建类型定义 并且有问题正确描述其结构 问题是嵌套的命名空间 在 JavaScript 中 我的方法的全名如下所示 NameSpace1 NameSpace2 NameSpace3 MethodName 但我无法创建
javascript
typescript
typescripttypings
将数组映射到接口
假设我有一个如下所示的数组 const options name foo type boolean name bar type string name bar should be baz not bar type number 我希望使用这
typescript
typescripttypings
typescript20
tsc
types 与 @types NPM 范围
在某些情况下typings用于处理 TypeScript 定义 例如角度 角度2种子 https github com angular angular2 seed 在其他情况下 范围为 NPM types包的使用没有typings涉及 例如
typescript
npm
typescripttypings
TypeScript:默认值不是构造函数
在我的 TypeScript 项目中 我想使用一个名为 的 Node js 模块 纯uuid https www npmjs com package pure uuid 对于纯 JavaScript pure uuid 可以按如下方式使用
typescript
import
module
export
typescripttypings
检索函数的返回类型而不调用该函数
假设我在 TypeScript 中有一个这样的函数 export const foo function return a 1 b true c bar 如果我将此函数导入到另一个文件中 import foo from foobar 我的问题
typescript
typescripttypings
typescript20
tsc
«
1
2
3
4
5
6
7
»