johnsoncodehk / vue-tsc

vue-tsc --noEmit && vite build
https://www.npmjs.com/package/vue-tsc
MIT License
241 stars 6 forks source link

How to define car[] #25

Closed cool-delete closed 3 years ago

cool-delete commented 3 years ago

image

//node_modules/@types/car.d.ts
interface car {

        identificationCode: "",
        superiorDepartments: "",
        higherUnit: "",
        state: "",
        trackPoints: {
            lng: number,
            lat: number,
          }[]
        position: pos

}
interface pos {
  lng: number;
  lat: number;
  icar: { point: {} };
}
export {car,pos};
johnsoncodehk commented 3 years ago

Try this.

interface car {

        identificationCode: string,
        superiorDepartments: string,
        higherUnit: string,
        state: string,
        trackPoints: {
            lng: number,
            lat: number,
          }[]
        position: pos

}
cool-delete commented 3 years ago

hhhh I think so