angular - angular 编译器语法问题

根据此链接:https://www.npmjs.com/package/@types/correlation-id

我正在尝试如下,但出现编译错误,我可以知道如何解决下面的问题吗?

import {withId} from 'correlation-id'

withId.withId(() => {withId.getId();}); //getting compile error here

回答1

你应该声明对象类?导出它。如果是TS。导出类 Foo { }

相似文章

随机推荐

最新文章