0
点赞
收藏
分享

微信扫一扫

ts全局变量定义


ts全局变量定义_前端

ts全局变量定义_全局变量_02


参照已有全局变量定义

​src/global.d.ts​

/*
* @Author: hongbin
* @Date: 2022-10-21 08:49:42
* @LastEditors: hongbin
* @LastEditTime: 2022-10-21 09:09:08
* @Description:全局类型,变量,常量
*/
//全局变量
declare let Hong: string;
declare const BIN: string;
//全局类型
declare type ignore = any;

就可以获得全局ts支持

ts全局变量定义_全局变量_03


ts全局变量定义_全局变量_04

ts全局变量定义_全局变量_05

更多类型

ts全局变量定义_typescript_06


举报

相关推荐

0 条评论