Last active
October 5, 2016 14:42
-
-
Save frontierpsycho/4406c9d134c9f85a01c3b2917503bfbb to your computer and use it in GitHub Desktop.
Typescript bug demonstration #1
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