antvis/G6

Request to remove Index signatures from typescript definitions #2905

jfstephe posted onGitHub

  • [ x ] I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

It's not possible to implement many of the common interfaces (NodeConfig, ModelConfig etc) without implementing an Index Signature.([key: string]: unknown;) This seems unnecessary, unintuitive and prevents strong typing of the classes.

The aim is to create a MyNodeConfig class that extends the functionality of NodeConfig (for example), adding custom properties and the like.

What does the proposed API look like?

Just remove the following from the TS type definitions :-)

([key: string]: unknown;

If you agree to this I'm happy to provide a PR.

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests