search

Home  >  Q&A  >  body text

javascript - When I read react-motion, I saw a function like export type xxxx. Is there such a way to write it in es6? I don’t know. Please ask. . .

export type SpringHelperConfig = {
stiffness?: number,
damping?: number,
precision?: number,
};
Just like the above code, later Can I directly import SpringHelperConfig and use it? . .

天蓬老师天蓬老师2768 days ago649

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-19 10:35:33

    es6 cannot be written like this. What you see should be typescript code.

    reply
    0
  • Cancelreply