# Type Alias: SchemaType<T>

> **SchemaType**\<`T`> = `T` *extends* [`BooleanSchema`](../../interfaces/BooleanSchema/) ? `boolean` : `T` *extends* [`NumberSchema`](../NumberSchema/) ? `number` : `T` *extends* [`StringSchema`](../StringSchema/) ? `StringHintTypeToSchemaType`\<`T`\[`"codaType"`\]> : `T` *extends* [`ArraySchema`](../../interfaces/ArraySchema/) ? `SchemaType`\<`T`\[`"items"`\]>[] : `T` *extends* `GenericObjectSchema` ? `ObjectSchemaType`\<`T`> : `never`

Defined in: [schema.ts:1950](https://github.com/coda/packs-sdk/blob/853bf0fabbc842fea7362510b545440b16a96b05/schema.ts#L1950)

A TypeScript helper that parses the expected `execute` function return type from a given schema. That is, given a schema, this utility will produce the type that an `execute` function should return in order to fulfill the schema.

For example, `SchemaType<NumberSchema>` produces the type `number`.

For an object schema, this will for the most part return an object matching the schema but if the schema uses [ObjectSchemaProperty.fromKey](../../interfaces/ObjectSchemaProperty/#fromkey) then this utility will be unable to infer that the return value type should use the property names given in the `fromKey` attribute, and will simply relax any property name type-checking in such a case.

This utility is very optional and only useful for advanced cases of strong typing. It can be helpful for adding type-checking for the return value of an `execute` function to ensure that it matches the schema you have declared for that formula.

## Type Parameters

| Type Parameter | | --- | | `T` *extends* [`Schema`](../Schema/) |
