목록JavaScript/TypeScript (2)
kohigowild
Problem 타입스크립트 환경에서 env 변수 사용 시 import.meta.env에서 타입 오류 발생 Property 'env' does not exist on type 'ImportMeta'. Reference https://github.com/vitejs/vite/issues/9539 Property 'env' does not exist on type 'ImportMeta' in 3.0.0 · Issue #9539 · vitejs/vite Describe the bug In vite 3.0.0 it still exists, even if it was previously closed. Can be recreated using react-ts template. Try to use env variabl..
string, number, boolean string "Hello, World!" number 29, Infinity, NaN boolean true, false object object 속성(Property) 키(Key), 값(Value) interface PersonType { name: string; age: number; isStudent: boolean; studentNum?: number; } const person:PersonType = { name: "박주경", age: 27, isStudent: true } const getPersonAge = (person: PersonType) => { console.log(person.age) } array, tuple, enum array str..