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
| git push -u origin $(git branch --show-current) |
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
| declare const brand: unique symbol; | |
| type Brand<T, Brand extends string> = T & { [brand]: Brand }; |
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 MyStrings = | |
| | 'One' | |
| | 'Two' | |
| | (string & {}); | |
| const mystring: MyStrings = "this will not error and autocomplete will still work"; |
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 NoInfer<T> = [T][T extends any ? 0 : never] |
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
| { | |
| "root": false, | |
| "$schema": "https://biomejs.dev/schemas/2.1.4/schema.json", | |
| "vcs": { | |
| "enabled": true, | |
| "clientKind": "git", | |
| "useIgnoreFile": true | |
| }, | |
| "files": { | |
| "ignoreUnknown": false, |
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 OK<T> = { | |
| data: T | |
| err: null | |
| } | |
| type Fail<E> = { | |
| data: null | |
| err: E | |
| } |
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 interpolate = function(template, params) { | |
| const names = Object.keys(params); | |
| const vals = Object.values(params); | |
| return new Function(...names, `return \`${template}\`;`)(...vals); | |
| } |
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
| npm install -g graphqurl | |
| gq https://graphql.contentful.com/content/v1/spaces/<space_id>/environments/<environment_name> -H 'Authorization: Bearer <CONTENTFUL_ACCESS_TOKEN>' --introspect > schema.graphql |
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
| [...Array(100).keys()] | |
| // Output: [0, 1, 2, 3, ..., 98, 99] |
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 { EntrySys } from "@contentful/app-sdk"; | |
| import { EntryMetaSysProps } from "contentful-management"; | |
| export const EntryStatus = { | |
| ARCHIVED: "archived", | |
| PUBLISHED: "published", | |
| CHANGED: "changed", | |
| DRAFT: "draft", | |
| } as const; |
NewerOlder