Skip to content

Instantly share code, notes, and snippets.

@frontierpsycho
Last active October 5, 2016 14:42
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 frontierpsycho/4406c9d134c9f85a01c3b2917503bfbb to your computer and use it in GitHub Desktop.
Save frontierpsycho/4406c9d134c9f85a01c3b2917503bfbb to your computer and use it in GitHub Desktop.
Typescript bug demonstration #1
class TestClass {
makeFunction(): (someCondition: boolean) => boolean {
return (someCondition: boolean = false) => {
return someCondition;
}
};
}
let test = new TestClass();
let generatedFunction = test.makeFunction();
console.log(generatedFunction());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment