Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
将 SweetAlert2 与 TypeScript 结合使用,找不到模块“sweetalert2/dist/sweetalert2.js”的声明文件
我正在将我的一个项目迁移到 TypeScript 在该项目中甜蜜警报2 https sweetalert2 github io 使用库 导入 SweetAlert2 JS 和 CSS 的默认方式是 import Swal from swee
javascript
typescript
typescripttypings
sweetalert2
javascriptimport
React Native:如何正确输入嵌套导航器?
情况 正如您可能知道的那样 我目前正在构建一个有声读物播放器 多么有创意 这是我第一个针对反应原生和打字稿的更大项目 在正确输入导航方面我有点挣扎 首先 这是一个快速概述 疑问 问题 感觉我使用了太多嵌套导航器 但由于我没有任何经验 所以很
ReactJS
typescript
ReactNative
reactnavigation
typescripttypings
安装@types/leaflet后无法访问全局L命名空间
我正在努力获取对导出命名空间的引用leaflet https www npmjs com package types leaflet我的 TypeScript 项目中的类型定义 安装类型后使用npm install save types l
typescript
leaflet
typescripttypings
typescript20
tsconfig - 如何忽略特定目录的 @types/whatever/node_modules ?
我正在使用 typescript 运行 Angular 1 5 耶 我们将两者都包括在内 types angular and types angular mocks 麻烦的是 types angular mocks lists types
angularJS
typescript
typescripttypings
yarnpkg
从可区分联合属性到对象类型的映射
我有一堆对象 它们都有一个属性来区分它们 我将它们作为联合类型 现在我想创建从可区分属性到实际类型的映射 我可以自己制作它 但它是两面性的并且容易出错 所以我想知道是否有某种方法可以使用 TypeScript 以编程方式生成它 type X
typescript
typescripttypings
如何修复打字不推荐的警告
当我跑步时 npm install 我收到了几十个这样的错误 typings WARN deprecated 9 9 2016 registry dt node 6 0 0 20160831021119 is deprecated upda
typescript
npm
ASPNETCore
typescripttypings
无序元组类型
我只是在深入研究 Typescript 类型 我想知道如何定义一个元组类型 但具有无序元素类型 我的意思是 有 type SimpleTuple number string const tup1 SimpleTuple 7 7 Valid
typescript
typescripttypings
在 TypeScript 中缩小通用、可区分联合的返回类型
我有一个类方法 它接受单个参数作为字符串并返回一个具有匹配的对象type财产 此方法用于缩小可区分的联合类型范围 并保证返回的对象始终是具有所提供的特定缩小类型type歧视价值 我试图为此方法提供一个类型签名 该签名将正确地从通用参数中缩小
typescript
typescripttypings
discriminatedunion
类型“Window & typeof globalThis”上不存在属性“showSaveFilePicker”
const opts suggestedName data types description NewCSV accept text csv csv const handle await window showSaveFilePicker
ReactJS
typescript
window
eslint
typescripttypings
具有定义值的 Typescript 动态对象键
我遇到一个问题 试图让打字稿为我识别 javascript 对象的键 同时强制每个键的值类型 因为我想创建对象键的类型 所以我不能只创建一个常规的type MyObject key string
typescript
typescripttypings
typescriptgenerics
Typescript:根据输入值返回函数类型(枚举)
我将一些设置存储到本地存储中 当我从存储中获取 并且最好也插入 值时 我想输入响应 据我所知 最好的方法似乎是使用函数重载 这就是我现在所拥有的并且它有效 export enum SettingsKey hasOnboarded hasOn
typescript
enums
typescripttypings
overloading
conditionaltypes
错误 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
«
1
2
3
4
5
6
7
»