antvis / antvis/F2

按需引入 f2 时,缺少 TypeScript 类型声明

Open
#1,343 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

- [ ] I have searched the [issues](https://github.com/antvis/f2/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 类型声明支持。

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the repository's types directory and the official on-demand import examples at https://f2.antv.vision/zh/docs/tutorial/require. Check how the `@antv/f2/lib/core` import is exposed to TypeScript, and consider the work complete when those examples have usable type declarations without the reported missing-declaration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.