Last active
October 5, 2016 14:44
-
-
Save frontierpsycho/30e044501faf7a48dc7ea23e8a494d61 to your computer and use it in GitHub Desktop.
Typescript bug demonstration #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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