# Function optional

- optional<Raw, Parsed>(
  schema: BaseSchema<Raw, Parsed>,
  ): Schema<Raw | null | undefined, Parsed | undefined>

  #### Type Parameters

  - Raw
  - Parsed

  #### Parameters

  - schema: BaseSchema<Raw, Parsed>

  #### Returns Schema<Raw | null | undefined, Parsed | undefined>

  - Defined in engine/sdks/typescript/api-full/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts:19