microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
packages/http/generated-defs/TypeSpec.Http.Private.ts
22lines · modecode
| 1 | import type { DecoratorContext, Model, Type } from "@typespec/compiler"; |
| 2 | |
| 3 | export interface HttpPartOptions { |
| 4 | readonly name?: string; |
| 5 | } |
| 6 | |
| 7 | export type PlainDataDecorator = (context: DecoratorContext, target: Model) => void; |
| 8 | |
| 9 | export type HttpFileDecorator = (context: DecoratorContext, target: Model) => void; |
| 10 | |
| 11 | export type HttpPartDecorator = ( |
| 12 | context: DecoratorContext, |
| 13 | target: Model, |
| 14 | type: Type, |
| 15 | options: HttpPartOptions, |
| 16 | ) => void; |
| 17 | |
| 18 | export type TypeSpecHttpPrivateDecorators = { |
| 19 | plainData: PlainDataDecorator; |
| 20 | httpFile: HttpFileDecorator; |
| 21 | httpPart: HttpPartDecorator; |
| 22 | }; |