F2
F2 copied to clipboard
按需引入 f2 时,缺少 TypeScript 类型声明
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
当通过 import F2 from '@antv/f2/lib/core';
引入时,TypeScript 会报告说没有找到合适的类型声明。
简单阅读了一下项目中 types 目录的代码,应该没有考虑过对于按需引入时的支持。
建议补足以优化 TypeScript 下的使用体验。
What does the proposed API look like?
对于按需引入相关的官方示例代码(https://f2.antv.vision/zh/docs/tutorial/require),都有良好的 TypeScript 类型声明支持。
我也发现这个问题,这时候是不是可以单独引入F2类型,仅作为类型使用? import type F2 from '@antv/f2/lib/index-all';