"export 'ColumnProps' was not found in './testData'

来源:6-13 添加新建文章页面

ShaneQin

2021-08-22

export interface ColumnProps {
id: number
title: string
avatar?: string
description: string
}

export interface PostProps {
id: number
title: string
content: string
image?: string
createdAt: string
columnId: number
}

export { ColumnProps, PostProps } from ‘./testData’

报错

WARNING Compiled with 2 warnings 1:57:11 PM

warning in ./src/store.ts

"export ‘ColumnProps’ was not found in ‘./testData’

warning in ./src/store.ts

"export ‘PostProps’ was not found in ‘./testData’

写回答

1回答

张轩

2021-08-23

同学你好 你这里是要在 store 中使用 testData 的两个interface 吗? 那应该是 import 才对啊

0
0

Vue3 + TS 仿知乎专栏企业级项目

带你完成前后端分离复杂项目,率先掌握 vue3 造轮子技能

3142 学习 · 2313 问题

查看课程