Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Created October 4, 2021 21:25
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 przemyslawjanpietrzak/bef785d5e4c15f4735264580ef78c002 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/bef785d5e4c15f4735264580ef78c002 to your computer and use it in GitHub Desktop.
let fn = (buttonSize: BUTTON_SIZES_UNION) => {};
fn('small');
fn('smal'); // Argument of type '"smal"' is not assignable to parameter of type 'BUTTON_SIZES_UNION'
let str: string;
fn(str); // Argument of type 'string' is not assignable to parameter of type 'BUTTON_SIZES_UNION'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment