Skip to content

Instantly share code, notes, and snippets.

@frontierpsycho
Last active October 5, 2016 14:44
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/30e044501faf7a48dc7ea23e8a494d61 to your computer and use it in GitHub Desktop.
Save frontierpsycho/30e044501faf7a48dc7ea23e8a494d61 to your computer and use it in GitHub Desktop.
Typescript bug demonstration #2
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