How to use ts-node regardless of errors?

ts-node has a –transpile-only (or -T) argument. It will ignore all type errors and just build your project. My 2022 suggestion for this to set up esbuild instead. Not a plug and play experience, but extremely fast. We use esbuild for (constant) building during development, and rely on other tools to report type errors.

How to decode/encode string to base64 in typescript express server

in Node typescript: import { Buffer } from “buffer”; const b64 = “SGVsbG8sIFdvcmxkIQ==”; const str=”Hello, World!” const decode = (str: string):string => Buffer.from(str, ‘base64’).toString(‘binary’); const encode = (str: string):string => Buffer.from(str, ‘binary’).toString(‘base64’); test(‘base64 decode’, () => { expect(decode(b64)).toEqual(str) }); test(‘base64 decode’, () => { expect(encode(str)).toEqual(b64) }); test(‘base64 encode/decode’, () => { expect(decode(encode(str))).toEqual(str) });

Boolean parameter in request body is always true in NestJS api

Found a workaround for the issue with class-transformer You can use this: @IsBoolean() @Transform(({ value} ) => value === ‘true’) public laserMode: boolean; This will transform the string into a boolean value, based on if it is ‘true’ or any other string. A simple workaround, but every string different than true, results in false.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)