---
title: InferNonOptionalInput
description: Infer non optional input type.
contributors:
  - fabian-hiller
---

# InferNonOptionalInput

Infer non optional input type.

```ts
// Create optional string schema
const OptionalStringSchema = v.optional(
  v.pipe(
    v.string(),
    v.transform((input) => input.length)
  )
);

// Infer non optional string input type
type NonOptionalStringInput = v.InferNonOptionalInput<
  typeof OptionalStringSchema
>; // string
```
