Created
July 20, 2021 18:28
-
-
Save PeterTillema/8617624b979cd52ae85b70a4948f9927 to your computer and use it in GitHub Desktop.
Prototype or not?
This file contains hidden or 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
java -jar compiler.jar \ | |
--externs extern.js \ | |
--compilation_level ADVANCED_OPTIMIZATIONS \ | |
--js=main.js \ | |
--js_output_file=out.js |
This file contains hidden or 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
/** | |
* @externs | |
*/ | |
var A; | |
/** | |
* @constructor | |
*/ | |
A.B = function() {} | |
/** | |
* @param a | |
* @returns {A.B} | |
*/ | |
A.b = function(a) {} | |
/** @type {number} */ | |
A.B.C; |
This file contains hidden or 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
let test = A.b(3); | |
console.log(test.C); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment