Skip to content

Instantly share code, notes, and snippets.

@Prajwalprakash3722
Last active September 14, 2022 18:14
Show Gist options
  • Save Prajwalprakash3722/a96c578ffdb1932d93d6c1f35263247a to your computer and use it in GitHub Desktop.
Save Prajwalprakash3722/a96c578ffdb1932d93d6c1f35263247a to your computer and use it in GitHub Desktop.
//todo.types.ts
export namespace Todo {
export interface TodoObject {
id: string;
title: string;
completed: boolean;
}
export namespace Controllers {
export namespace Add {
export interface Request {
todo: TodoObject;
}
export interface Response {
ok: boolean;
}
}
export namespace Get {
export interface Request {
id: string;
}
export interface Response {
todos: TodoObject[];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment