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
| // T extends T is insufficient, because mapping a function or a branded type results in `{}` | |
| // so all primitives and functions must be filtered out. | |
| type Expand<T> = T extends string | number | boolean | bigint | null | void | symbol | Function | Date ? T : { [K in keyof T]: T[K] } | |
| type DeepExpand<T> = T extends string | number | boolean | bigint | null | void | symbol | Function | Date ? T : { [K in keyof T]: DeepExpand<T[K]> } |
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 { fileURLToPath } from "url"; | |
| export async function load(url, context, defaultLoad) { | |
| if(/\.yaml$/.test(url)) { | |
| const path = fileURLToPath(new URL(url)); | |
| return { | |
| format: "module", | |
| source: ` | |
| import fs from "fs/promises"; | |
| import YAML from 'yaml'; | |
| const yamlSource = await fs.readFile(${JSON.stringify(path)}, "utf8"); |
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 bash | |
| set -euo pipefail; | |
| config="${XDG_CONFIG_HOME:-$HOME/.config}/obsidian/obsidian.json" | |
| path="$1" | |
| # Lookup an already existing vault-id | |
| script='.vaults | to_entries[] | select(.value.path == $path) | first(.key)' | |
| vaultid="$(<"$config" jq --arg path "$path" "$script" -r)" |
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
| type Color = | |
| | `#${string}` | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})` | |
| | `hsl(${number}%,${number}%,${number}%)` | `hsla(${number}%,${number}%,${number}%,${number})` | |
| | ColorKeywords | Lowercase<ColorKeywords> | Uncapitalize<ColorKeywords> | |
| type ColorKeywords = | |
| | "AliceBlue" | "AntiqueWhite" | "Aqua" | "Aquamarine" | "Azure" | "Beige" | |
| | "Bisque" | "Black" | "BlanchedAlmond" | "Blue" | "BlueViolet" | "Brown" | |
| | "BurlyWood" | "CadetBlue" | "Chartreuse" | "Chocolate" | "Coral" | |
| | "CornflowerBlue" | "Cornsilk" | "Crimson" | "Cyan" | "DarkBlue" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 NonExhaustiveUseOfDebug = Symbol(); | |
| export declare function dump(strings: TemplateStringsArray, ...interpolations: unknown[]): void; | |
| export declare function dump<F extends string | number>(props: { fields: { [_ in F]: unknown } }): | |
| <I extends F>(strings: TemplateStringsArray, ...interpolations: ([F] extends [I] ? I[] : (F extends I ? F & { [NonExhaustiveUseOfDebug]: true } : F)[])) => void; | |
| dump`whatever`; | |
| dump({ fields: { SpecificString: ['a', 'b'] }})`This is a test ${'SpecificString'} :)`; // ok | |
| dump({ fields: { SpecificString: ['a', 'b'], boo: {} }})`This is a test ${'SpecificString'} :)`; // error |
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
| /* | |
| MIT License | |
| Copyright (c) webstrand 2022 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
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
| export {jsx, jsx as jsxs, jsx as Fragment} | |
| type DOMElement = Element; | |
| declare global { | |
| namespace JSX { | |
| type Element = DOMElement; | |
| type ChildElement = string | number | boolean | symbol | bigint | null | undefined | { toString(): string } | (() => ChildElements) | Node; | |
| type ChildElements = ChildElement | Iterable<ChildElement>; | |
| interface HTMLAttributes<T> { |
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
Show hidden characters
| { | |
| "env": { | |
| "browser": true, | |
| "es6": true | |
| }, | |
| "extends": [ | |
| "eslint:recommended" | |
| ], | |
| "globals": { | |
| "Atomics": "readonly", |
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
| --- a/lib/tsc.js | |
| +++ b/lib/tsc.js | |
| @@ -53539,1 +53539,1 @@ var ts; | |
| - if (instantiationDepth === 100 || instantiationCount >= 5000000) { | |
| + if (instantiationDepth === 100*2 || instantiationCount >= 5000000*2) { | |
| --- a/lib/tsserver.js | |
| +++ b/lib/tsserver.js | |
| @@ -64294,1 +64294,1 @@ var ts; | |
| - if (instantiationDepth === 100 || instantiationCount >= 5000000) { | |
| + if (instantiationDepth === 100*2 || instantiationCount >= 5000000*2) { |