···7788Sometimes the default plugin behavior isn't what you need or expect. Resolvers let you patch plugins in a safe and performant way, without forking or reimplementing core logic.
991010-Currently available for [Valibot](/openapi-ts/plugins/valibot) and [Zod](/openapi-ts/plugins/zod).
1010+Currently available for [TypeScript](/openapi-ts/plugins/typescript), [Valibot](/openapi-ts/plugins/valibot), and [Zod](/openapi-ts/plugins/zod).
11111212## Examples
1313
+4
docs/openapi-ts/plugins/typescript.md
···166166167167:::
168168169169+## Resolvers
170170+171171+You can further customize this plugin's behavior using [resolvers](/openapi-ts/plugins/concepts/resolvers).
172172+169173## API
170174171175You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/typescript/types.ts) interface.
···11import type { Plugin, SchemaVisitorContext, SchemaWithType, Walker } from '@hey-api/shared';
2233import type { $, DollarTsDsl } from '../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type, TypeScriptResult } from './shared/types';
44+import type { Type, TypeScriptResult } from './shared/types';
55+import type { HeyApiTypeScriptPlugin } from './types';
5667export type Resolvers = Plugin.Resolvers<{
78 /**
···2233import type { MaybeTsDsl, TypeTsDsl } from '../../../../ts-dsl';
4455-export type { HeyApiTypeScriptPlugin } from '../types';
66-75export type Type = MaybeTsDsl<TypeTsDsl>;
8697/**
···4455import { createSchemaComment } from '../../../../plugins/shared/utils/schema';
66import { $ } from '../../../../ts-dsl';
77+import type { HeyApiTypeScriptPlugin } from '../types';
78import { createProcessor } from '../v1/processor';
88-import type { HeyApiTypeScriptPlugin } from './types';
991010export function webhookToType({
1111 operation,
···44import { deduplicateSchema } from '@hey-api/shared';
5566import { $ } from '../../../../../ts-dsl';
77-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
77+import type { Type } from '../../shared/types';
88import type { TypeScriptResult } from '../../shared/types';
99+import type { HeyApiTypeScriptPlugin } from '../../types';
9101011export function arrayToAst({
1112 plugin,
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667export function booleanToAst({
78 schema,
···2233import { $ } from '../../../../../ts-dsl';
44import type { EnumResolverContext } from '../../resolvers';
55-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
55+import type { Type } from '../../shared/types';
66import type { TypeScriptEnumData } from '../../shared/types';
77+import type { HeyApiTypeScriptPlugin } from '../../types';
7889function buildEnumData(
910 plugin: HeyApiTypeScriptPlugin['Instance'],
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667// eslint-disable-next-line @typescript-eslint/no-unused-vars
78export function neverToAst(args: {
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667// eslint-disable-next-line @typescript-eslint/no-unused-vars
78export function nullToAst(args: {
···2233import { $ } from '../../../../../ts-dsl';
44import type { NumberResolverContext } from '../../resolvers';
55-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
55+import type { Type } from '../../shared/types';
66+import type { HeyApiTypeScriptPlugin } from '../../types';
6778function constNode(ctx: NumberResolverContext): Type | undefined {
89 const { schema } = ctx;
···55import { createSchemaComment } from '../../../../../plugins/shared/utils/schema';
66import { $ } from '../../../../../ts-dsl';
77import type { ObjectResolverContext } from '../../resolvers';
88-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
88+import type { Type } from '../../shared/types';
99import type { TypeScriptResult } from '../../shared/types';
1010+import type { HeyApiTypeScriptPlugin } from '../../types';
10111112function shapeNode(ctx: ObjectResolverContext): ReturnType<typeof $.type.object> {
1213 const { schema, walk, walkerCtx } = ctx;
···4455import { $ } from '../../../../../ts-dsl';
66import type { StringResolverContext } from '../../resolvers';
77-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
77+import type { Type } from '../../shared/types';
88+import type { HeyApiTypeScriptPlugin } from '../../types';
89910function constNode(ctx: StringResolverContext): Type | undefined {
1011 const { schema } = ctx;
···33import type { Walker } from '@hey-api/shared';
4455import { $ } from '../../../../../ts-dsl';
66-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
66+import type { Type } from '../../shared/types';
77import type { TypeScriptResult } from '../../shared/types';
88+import type { HeyApiTypeScriptPlugin } from '../../types';
89910export function tupleToAst({
1011 plugin,
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667// eslint-disable-next-line @typescript-eslint/no-unused-vars
78export function undefinedToAst(args: {
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667export function unknownToAst({
78 plugin,
···11import type { SchemaWithType } from '@hey-api/shared';
2233import { $ } from '../../../../../ts-dsl';
44-import type { HeyApiTypeScriptPlugin, Type } from '../../shared/types';
44+import type { Type } from '../../shared/types';
55+import type { HeyApiTypeScriptPlugin } from '../../types';
5667// eslint-disable-next-line @typescript-eslint/no-unused-vars
78export function voidToAst(args: {
···55import { $ } from '../../../../ts-dsl';
66import { defaultMeta, inheritMeta } from '../shared/meta';
77import type { ProcessorContext } from '../shared/processor';
88-import type { HeyApiTypeScriptPlugin, TypeScriptResult } from '../shared/types';
88+import type { TypeScriptResult } from '../shared/types';
99+import type { HeyApiTypeScriptPlugin } from '../types';
910import { arrayToAst } from './toAst/array';
1011import { booleanToAst } from './toAst/boolean';
1112import { enumToAst } from './toAst/enum';