Skip to content

Instantly share code, notes, and snippets.

@mohsen1 mohsen1/overload.ts
Created Sep 26, 2017

Embed
What would you like to do?
/**
* Create an input element
*/
function createInput(type: 'text', value: string): HTMLInputElement;
function createInput(type: 'checkbox', value: boolean): HTMLInputElement;
function createInput(type, value) {
// code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.