I have a file called mock-values.ts that just has:
export const TIMES: Time[] = [
{ i: '8:00', v: '8' }, { i: '8:30', v: '8:30' },
{ i: '9:00', v: '9' }, { i: '9:30', v: '9:30' },
{ i: '10:00', v: '10' }, { i: '10:30', v: '10:30' },
{ i: '11:00', v: '11' }
];
export const MINUTES: Minute[] = [
{ half_hour: '30' },
{ half_hour: '60' },
{ half_hour: '90' }
];
When I run ng serve I am met with this error message ERROR in src/app/meeting-form/mock-values.ts(1,21): error TS2304: Cannot find name 'Time'.
src/app/meeting-form/mock-values.ts(13,23): error TS2304: Cannot find name 'Minute'.
And here is my import in my form.component.ts
import { TIMES, MINUTES } from './mock-values';
times = TIMES;
minutes = MINUTES;
After about a minute it compiles successfully because it eventually finds it. Is there any way to tell Angular to chill out or make the process easier for the compiler?
TimeandMinutedefined?times = TIMES;minutes = MINUTES;TimeandMinuteon order to use them as a types