Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
处理未定义声明文件的正确方法(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
安装 Ionic2 应用程序所需的类型
所以我正在研究 Ionice2 项目 这仍然是新项目 差不多一周了 并且我正在尝试按照下面的教程使用 PouchDB 进行 LocalStorage 教程 http gonehybrid com how to use pouchdb sql
angular
requireJs
ionic2
pouchdb
typescripttypings
Typescript 能够进行简单的函数组合吗?
Typescript 能够进行简单的函数组合吗 我写出了以下用于测试的 compose map 和 filter 的基本实现 下面先设置类型和功能 然后再实现 javascript 似乎没问题 但打字稿显示误报compose用来 具体来说
typescript
functionalprogramming
typescripttypings
typescriptgenerics
如何在 Typescript 中使用 redux-thunk 通过 ThunkAction 正确输入 thunk?
我正在尝试输入检查我的redux thunk使用 Typescript 编写代码 来自 Redux 官方文档 与 Redux Thunk 一起使用 https redux js org recipes usage with typescri
typescript
redux
typescripttypings
reduxthunk
让打字稿知道 webpack 的 `require.context` 中的所有键
一个相对的问题是https stackoverflow com a 53015011 2326199 https stackoverflow com a 53015011 2326199 当所有键都被硬编码时 jcalz 的答案非常有效 但
typescript
typescripttypings
如何在打字稿中描述简单的 Just 函子的接口?
我第一次尝试用打字稿编写一个简单的界面 并对几乎所有事情都抱有疑问 问题很简单 如何描述这个简单的笑话匹配器扩展 param v Any value function just v return fmap f gt just f v exp
javascript
typescript
VisualStudioCode
jestjs
typescripttypings
是否可以从数组创建打字稿类型?
我经常使用诸如 export type Stuff something else export const AVAILABLE STUFF Stuff something else 这样我就可以使用类型Stuff 并在需要时迭代所有可用的内
typescript
typescripttypings
Typescript:省略类型中的未定义/空属性
我试图从类型创建新类型 但删除其值为 undefined null 的任何属性 这是为了创建一个需要 不需要有效负载参数的获取函数 主要类型是 type TEndpointsPayload getList undefined open id
javascript
typescript
typescripttypings
typescriptgenerics
Typescript 数组接口,具有编号索引和可通过字符串键访问的自定义属性
我想要一个按数字索引的对象数组 并将数组上的所有对象放在特定键下 像这样的事情 const myArray ICustomArray myArray push item myArray item key item 但我正在努力定义它的界面
typescript
typescripttypings
Typescript 函数返回类型基于可选参数的存在,而不使用函数重载
打字稿游乐场 https www typescriptlang org play code C4TwDgpgBAKgmgBQKIH0CMUC8UBE9no4BQoksiqATFrvlcSeNAMIDyAcgCICSM3HNHGy69 7Bg
typescript
overloading
typescripttypings
optionalparameters
在打字稿中扩展枚举
我希望在枚举中重用某些值 有关如何实现此类功能的任何建议 enum someEnum a Some String b 2 enum extendedEnum c string b someEnum b type someEnumType
typescript
typescripttypings
Typescript:如何在 React 中添加历史对象的类型检查?
我有以下代码 它接收历史对象作为道具 const ChildComponent history gt div div div div
ReactJS
typescript
typescripttypings
«
1
2
3
4
5
6
7
»