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
| /** | |
| * @OnlyCurrentDoc | |
| * | |
| * The above comment directs Apps Script to limit the scope of file | |
| * access for this add-on. It specifies that this add-on will only | |
| * attempt to read or modify the files in which the add-on is used, | |
| * and not all of the user's files. The authorization request message | |
| * presented to users will reflect this limited scope. | |
| */ |
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
| import os | |
| import sys | |
| from jinja2 import Environment, FileSystemLoader | |
| from typing import Dict, Union | |
| def render( | |
| infile: str, | |
| outfile: str = None, | |
| data: Dict[str, Union[str, int]] = None, |
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
| # ############################### | |
| # Part 1: Create a new Heroku app | |
| # ############################### | |
| # Give your app a unique name | |
| APP_NAME="my-secret-app" | |
| # Create your project in a new repo | |
| # This example uses React but you can use whatever you like | |
| npx create-react-app $APP_NAME |
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
| const myStrings = ['A', 'B', 'C', 'D'] as const; | |
| type MyStrings = typeof myStrings[number] | |
| function isMyString(candidate: string): candidate is MyStrings { | |
| const valid: typeof myStrings = ['A', 'B', 'C']; // Error! `valid` is not `typeof myStrings | |
| return valid.indexOf((candidate as MyStrings)) !== -1; | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.