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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Debug Rollup", | |
| "program": "${workspaceFolder}/node_modules/.bin/rollup", | |
| "args": ["-c"], | |
| "internalConsoleOptions": "openOnSessionStart" |
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
| /** @typedef {{swim: () => void}} Fish */ | |
| /** @typedef {{fly: () => void}} Bird */ | |
| /** | |
| * @param {Fish | Bird} pet | |
| * @returns {pet is Fish} | |
| */ | |
| function isFish(pet) { | |
| return "swim" in pet; | |
| } |
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
| window.onscroll = function () { | |
| /** @type {HTMLElement | null} */ | |
| const header = document.querySelector('header'); | |
| if (header !== null) { | |
| if (window.scrollY < 5) { | |
| header.classList.remove('scrolled'); | |
| } else { | |
| header.classList.add('scrolled'); | |
| } | |
| } |
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
| #!/usr/bin/env node | |
| // @ts-check | |
| import fetch from "node-fetch"; | |
| import fs from "fs"; | |
| import { IgApiClient } from "instagram-private-api"; | |
| /** | |
| * @typedef InstaPost | |
| * @prop {string} thumbnailUrl |
OlderNewer