Git Product home page Git Product logo

Comments (6)

Aarebecca avatar Aarebecca commented on July 24, 2024

可以提供以下你的使用示例吗,我们正在评估给包括数据及API提供范型的形式

from g6.

mivui avatar mivui commented on July 24, 2024

IMG_20240621_102115_edit_2530066147060294.jpg

IMG_20240621_102301_edit_2530173197586319.jpg

from g6.

mivui avatar mivui commented on July 24, 2024

主要是通过graph.getNodeData和graph.getEdgeData返回指定类型也应提供泛型
修改示例

getNodeData<T extends NodeData>(id:ID):T

from g6.

Aarebecca avatar Aarebecca commented on July 24, 2024

在最初版的实现中其实我们采用了类似的泛型设计,不过后来简化了,我们后续会评估重新加上泛型的必要性

from g6.

zzjjbbaa avatar zzjjbbaa commented on July 24, 2024

image
我觉得这样更方便吧,还不用每个地方去传泛型类型

from g6.

Aarebecca avatar Aarebecca commented on July 24, 2024

image 我觉得这样更方便吧,还不用每个地方去传泛型类型

这也不失为一种解决方式,正式版没有加上泛型的主要原因就是以为需要传泛型的地方太多了,会比较繁琐

from g6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.