Skip to content

Instantly share code, notes, and snippets.

@jakerobers
Created October 28, 2020 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakerobers/c4445abe018c7af1c9d8c7eb3d1070bc to your computer and use it in GitHub Desktop.
Save jakerobers/c4445abe018c7af1c9d8c7eb3d1070bc to your computer and use it in GitHub Desktop.
interface Validator {
isValid: () => bool,
getErrorMessage: () => string
}
interface Quantity {
isValid: () => bool,
getRaw: () => string,
getValue: () => number,
}
interface Product {
id: number,
getQuantity: Quantity,
setQuantity: (string) => void,
getPrice: () => number,
getTotal: () => number,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment