Example
const increase = decorate(
(n: number) => n,
increaseBy1,
increaseBy2,
increaseBy3,
on: | |
push: | |
branches: | |
- "develop" | |
name: Release | |
permissions: | |
contents: write | |
pull-requests: write |
import { z } from "zod"; | |
import * as fs from "fs/promise"; | |
export class LifeConfig<T extends z.ZodObject<any>> { | |
bootstrapProcess: Promise<void>; | |
watchingProcess: null | Promise<void> = null; | |
store: null | z.infer<T> = null; | |
ready = Promise.withResolvers<null>(); | |
subs = new Set<(state: z.infer<T>) => void>(); |
expect( | |
unindent` | |
Ok | |
`, | |
).toEqual("Ok\n"); | |
expect( | |
unindent` | |
foo | |
biz |
const colors: Record<string, [number, number]> = { | |
reset: [0, 0], | |
bold: [1, 22], | |
dim: [2, 22], | |
italic: [3, 23], | |
underline: [4, 24], | |
blink: [5, 25], | |
inverse: [7, 27], | |
hidden: [8, 28], | |
strikethrough: [9, 29], |
Astro.build is a web framework for building websites, and it also enables you to create Progressive Web Apps (PWAs). One of Astro's powerful features is its ability to import and compile scripts at runtime.
Let's take a look at the following sample:
<script>
import "../scripts/script.js"
{ | |
"targets": { | |
"debug": { | |
"outFile": "build/debug.wasm", | |
"textFile": "build/debug.wat", | |
"sourceMap": true, | |
"debug": true | |
}, | |
"release": { | |
"outFile": "build/release.wasm", |
You can use avn
to deeply integrate into your shell and automatically invoke nvm
when changing directories. avn
is not supported by the nvm
maintainers. Please report issues to the avn
team.
If you prefer a lighter-weight solution, the recipes below have been contributed by nvm
users. They are not supported by the nvm
maintainers. We are, however, accepting pull requests for more examples.
A little guide to using git as a ninja.
The big problem to use git commit -m
is the idea to write a good commit message. Some IDEs than VSCode offer a textarea to write a draft message while writing your code but if you change the branch? or change takes time in another project?
My solution to this dispersion is to write the commit message by branch. Is a good practice to write your changes in a branch distinct of development|develop
and main|master
and is a best good practice to write the commit with "Commits convention".
Transform the type in a type serializable.
Sample:
[](https://www.typescriptlang.org/play?noImplicitThis=false&ts=4.7.4#code/C4TwDgpgBAyhBOBLAhgG0QL2QI1RAQsgM4QA8AKgHxQC8U5UEAHsBAHYAmRURwSbAcygAfKGwCuAW2wIRUbAHsFeZGzkTUqKAH56UAFwAoKCb3NWnbgDFxbAMbBECtbrYQAbrKOmzLdlygFbAArCAcdKABvKABtAGkoRDUAawgQBQAzegBdfSgAUSY7VHEOCAA5DwRSOCQ0TBw8QhIKeOzKagBfA2NTN094Q0NQSAKikrLKgYpqOgZzf24g0PDdAAVEO2SKABoo2ISkqFT0rPJc+jbGP0sxKvgI-q8oBM6Yk8yc6m9TcgBuIYjaC1FDoLC4MhUWhjYqlCr3GoIUENCHNSEdIbFYjcfBRXomDKICCoDh5Xj8AT4xjweB5fI0hSDKl2Zzk8QORkACmweRB9XBeFI+EoAEo8T4fMAABaIIgAOkJxI40OwCqJJKpkpl8oQDzoAHkQmFgHLsYgBGxOW4AO4FBnwTkivaq3UiqmdQwewxYojcACC4r6yEkEDJfCSlJ8yAEobEUhkgx8dngEGQrA4fuAeQk0gQVMVJIA+jyoPghknWXx2cAucheUj+Y0yH7RYGJVBpbK5Wxg9A6Mhu73NaZO-Lo32oAPx8OTKO5cnU+nM9CBwu0xAM8AZx3tWqlcXoTbS5yBwWOMWRQCfF7JYgQ370J5Hdn47JItuU8BxPA1AARdfdgo1qOlAAC0O5dmuS7AFepgel6QKToWJB1GCTbQnyaEQqQLYAoh2DIQ2WF4BhREooKwoAk