Miment icon indicating copy to clipboard operation
Miment copied to clipboard

TypeScript 支持

Open momtboy opened this issue 7 years ago • 3 comments

momtboy avatar Apr 18 '18 15:04 momtboy

对TS仅限于入门水平,不过据我了解,TS不是JS的超集吗?不能直接使用? 如果确实有这个需求,可以考虑做一个TS版的。

noahlam avatar Apr 18 '18 15:04 noahlam

@momtboy 目前的源码很少且魔改了原型链,个人认为并不是很适合用 TS 重写。

但对 d.ts 的支持是很有意义的,不妨加入 Roadmap 😄

doodlewind avatar Apr 18 '18 17:04 doodlewind

import 方式引入 在 typescript 中使用报错

import miment from 'miment'
Uncaught (in promise) TypeError: miment_1.default is not a function

改为 require 方式引入就好了

const miment =require('miment')

WangShuXian6 avatar Oct 20 '18 01:10 WangShuXian6