Required option for query params
Abierto
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.8k
- Forks
- 294
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 21
Descripción
Similar to `strict`, it would be handy with a `required` option that throws if the parameter is missing
```typescript
const searchParamsConfig = {
count: parseAsInteger.withOptions({ required: true }),
}
const loadSearchParams = createLoader(searchParamsConfig )
// Expected:
const { count, contributors } = loadSearchParams(request, { strict: true })
// count: number
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.