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 {UserService, UpdateUserDto, CreateUserDto, UserResponseDto, CreateDeviceDto, DeviceResponseDto, CreateMeetingDto, AgendaResponseDto} from '../../data' | |
import {ApiTags, ApiBody, ApiResponse, ApiOperation, ApiBearerAuth, ApiNotFoundResponse} from '@nestjs/swagger' | |
import {Get, Body, Post, Patch, Param, Delete, Controller, UnauthorizedException} from '@nestjs/common' | |
import {CaslAbilityFactory} from '../casl/casl-ability.factory' | |
import {AuthUserLogged, UserRole} from '@contact/type' | |
import {User} from '../../data/user/ports/user' | |
import {Logged, Roles} from '../../utils' | |
type Constructor<T = unknown> = new (...params: unknown[]) => 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
type PropControl<T, P extends keyof T = keyof T> = { | |
value: T[P] | |
set(value: T[P]): void | |
patch(value: Partial<T[P]>): void | |
onChange(fn: Callback<T[P]>): void | |
} | |
type StateByKey<T> = { [P in keyof T]: PropControl<T, P> } | |
type Callback<T> = (value: T) => void |
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 GameCallback = (gamepad: Gamepad) => void | |
interface GameAnimation { | |
animation: number | |
cancel(): void | |
} | |
export class GameControl { | |
#animations: GameAnimation[] = [] |
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 abstract class AxesHandler<T = Readonly<number>> { | |
abstract handle(value: readonly T[]): {x: number; y: number} | |
abstract isActive(value: T): boolean | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link rel="preconnect" href="https://fonts.googleapis.com" /> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
<link | |
href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap" |
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 './style.scss' | |
const canvas = document.createElement('canvas') | |
const contexto = canvas.getContext('2d') | |
const config = { | |
bola: { | |
raio: 10, | |
}, | |
raquete: { |
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 'reflect-metadata' | |
type InputType = | |
| 'checkbox' | |
| 'color' | |
| 'datetime-local' | |
| 'email' | |
| 'file' | |
| 'image' | |
| 'month' |
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 const noop = () => null | |
export function pickFn< | |
T extends CustomElementConstructor, | |
K extends keyof T = keyof T | |
>(target: T, key: K) { | |
return target[key] ?? noop | |
} | |
export function define( |
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
let state: any | |
function handleState<T = unknown>(data: T) { | |
state = data | |
// const events: ((state: T) => void)[] = [] | |
const events = new Set<(state: T | null) => void>() | |
return { | |
set(newState: T | null) { | |
if (newState === null) { |