What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-19 12:27:08
create type as values of list typescript
function stringLiterals<T extends string>(...args: T[]): T[] { return args; } type ElementType<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never; const values = stringLiterals('A'... Add solution -
Javascript 2021-09-29 08:54:04
validator max e min redux form
import React from 'react' import { Field, reduxForm } from 'redux-form' const required = value => (value || typeof value === 'number' ? undefined : 'Required') const maxLength = max => value => value && value.length > max ? `Must be... Add solution