Created
October 15, 2019 17:11
-
-
Save developit/ee19a1db75175aa023e45a687dc4e58d to your computer and use it in GitHub Desktop.
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
package-lock.json | |
node_modules |
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
/**Joins two strings. | |
* @param {string} a The first string to join | |
* @param {string} [b] The second string to join | |
* @returns {string} text | |
*/ | |
export default function join(a: string, b?: string): string; |
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
/**Joins two strings. | |
* @param {string} a The first string to join | |
* @param {string} [b] The second string to join | |
* @returns {string} text | |
*/ | |
export default function join(a, b) { | |
if (b) return a + b; | |
return a; | |
} | |
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
{ | |
"name": "tsc-checkjs-dts-demo", | |
"main": "index.js", | |
"scripts": { | |
"build": "tsc -d --emitDeclarationOnly --allowJs --checkJs index.js" | |
}, | |
"devDependencies": { | |
"typescript": "^3.7.0-beta" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment