How to use globally declared enums, interfaces, or types in nuxt3? #25930
Unanswered
FatNerdPeng
asked this question in
Questions
Replies: 2 comments 1 reply
-
@FatNerdPeng did you figure out how to do that? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I like to add a Note: The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a function in the
.vue
file in thepages
directory:This
RequestMethod
is an enumeration declared by me in a file calledcommon. d. ts
in theutils
directory:and then it reports an error:
ReferenceError: RequestMethod is not defined
I am a noob in TypeScript and Nuxt, so I don't know where I made a mistake, but it didn't prompt me for an error during compilation, so this is a runtime error?
Beta Was this translation helpful? Give feedback.
All reactions