Skip to content

Instantly share code, notes, and snippets.

View Luisgustavom1's full-sized avatar

Luis Gustavo Macedo Luisgustavom1

View GitHub Profile
@Luisgustavom1
Luisgustavom1 / VScode extensions
Created May 22, 2023 22:57
My vscode extensions
bradlc.vscode-tailwindcss
clinyong.vscode-css-modules
dbaeumer.vscode-eslint
eamodio.gitlens
EditorConfig.EditorConfig
esbenp.prettier-vscode
glenn2223.live-sass
golang.go
jock.svg
Luisao.one-more-coffee
@Luisgustavom1
Luisgustavom1 / example.ts
Last active October 12, 2023 22:34
The purpose this code is to study about more complex type system of typescript. Its a query builder type system
interface User {
id: number;
name: string;
email: string;
password: string;
updated_at: Date;
}
interface Product {
id: number;
function digitalRoot(n) {
if (n < 10) {
return n;
}
let nu = n
let s = 0
while(nu > 0) {
const r = nu % 10
snail = function(array) {
if (array.length === 0) return []
if (array.length === 1) return array[0]
const a = []
let bxi = 0
let bxe = array[0].length - 1
let byi = 0
let bye = array.length - 1
class Calcular {
somar(valor, salarioPessoas) {
let total;
if (total === undefined) {
valor = null;
} else if (valor > 0) {
total = valor;
for (let salario of salarioPessoas) {