# InferNonOptionalInput

> This document is the Markdown version of [valibot.dev/api/InferNonOptionalInput/](https://valibot.dev/api/InferNonOptionalInput/). For the complete documentation index, see [llms.txt](https://valibot.dev/llms.txt).

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
```
