VS Code中没有导出的成员错误,但在控制台中没有

时间:2020-05-04 13:51:41

标签: typescript visual-studio-code typeorm

我有一个NestJS项目(项目A)和一个使用@nestjs/typeormtypeorm包的模块。

我的另一个NestJS项目(项目B)将使用此模块。但是,有一个问题。在项目B中,我有实体,并且此实体应具有在typeorm包中定义的注释(装饰器)。如果我在项目B中安装了typeorm软件包,则可以使用此装饰器。但是,由于这个原因,typeorm在项目A和项目B中可以具有不同的版本。最好的版本是重新导出所有这些typeorm东西,在我的项目A中,加上相应的模块,对不对?

所以我将其重新导出到项目A中

export * from 'typeorm';

如果我是从控制台运行的,则可以正常运行(我没有检测到任何异常行为)。但是,在我的IDE(Visual Studio代码)中,这是带有下划线的,并且表示Module (project A) has no exported member Column

有什么想法要在IDE中解决吗?

1 个答案:

答案 0 :(得分:0)

<Page> <Page.Resources> <DataTemplate x:Key="ListIntTemplate" x:DataType="local:VmServiceModel"> <ListView ItemsSource="{x:Bind Parameters}" HorizontalAlignment="Center" SelectionMode="None" Background="Transparent"> <ListView.ItemsPanel> <ItemsPanelTemplate> <controls:WrapPanel VerticalAlignment="Top"/> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.ItemTemplate> <DataTemplate x:DataType="local:Parameter"> <TextBox Text="{Binding Value Mode=TwoWay}" Height="36" Width="65"/> </DataTemplate> </ListView.ItemTemplate> </ListView> </DataTemplate> </Page.Resources> <Grid> <ListView ItemsSource="{x:Bind ViewModel.AtlasMethodParameterList}" ItemTemplate="{StaticResource ListIntTemplate}"> </ListView> </Grid> </Page> 存在是有原因的!您可以通过强制在两个项目中安装相同版本来确保两个项目中的TypeORM版本相同!