Skip to content

Instantly share code, notes, and snippets.

@diegogriep
Created May 30, 2020 20:45
Show Gist options
  • Save diegogriep/62b4adba3032b6efd9497b88676d2c59 to your computer and use it in GitHub Desktop.
Save diegogriep/62b4adba3032b6efd9497b88676d2c59 to your computer and use it in GitHub Desktop.
interface DefaultResponse<T> {
code: number;
content: T;
timestamp: string;
valid: boolean;
}
interface Driver {
id: number;
name: string;
age: number;
}
interface Team {
id: number;
name: string;
base: string;
}
const payloadDriver: DefaultResponse<Driver> = {
code: 1000,
content: {
id: 1,
name: 'Senna',
age: 33
},
timestamp: 'Jun 1, 2020 10:39:58 AM',
valid: true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment