typescript/printers
@hashml/hashml › Globals › "typescript/printers"
Index
Variables
Functions
- createArrayType
- createImport
- createInterface
- createInterfaceMember
- createLiteralStringType
- createParserFunction
- createSchema
- createTypeAlias
- createUnionType
Variables
Const
disclaimer
• disclaimer: "/! This file was generated by Hashml https://github.com/hashml/hashml /" = "/*! This file was generated by Hashml https://github.com/hashml/hashml */"
Defined in typescript/printers.ts:5
Const
indentation
• indentation: string = " ".repeat(4)
Defined in typescript/printers.ts:3
Functions
createArrayType
▸ createArrayType(type
: string): string
Defined in typescript/printers.ts:45
Parameters:
Name | Type |
---|---|
type | string |
Returns: string
createImport
▸ createImport(members
: string[], importPath
: string): string
Defined in typescript/printers.ts:8
Parameters:
Name | Type |
---|---|
members | string[] |
importPath | string |
Returns: string
Const
createInterface
▸ createInterface(typeName
: string, members
: string[]): string
Defined in typescript/printers.ts:36
Parameters:
Name | Type |
---|---|
typeName | string |
members | string[] |
Returns: string
createInterfaceMember
▸ createInterfaceMember(name
: string, type
: string): string
Defined in typescript/printers.ts:32
Parameters:
Name | Type |
---|---|
name | string |
type | string |
Returns: string
createLiteralStringType
▸ createLiteralStringType(str
: string): string
Defined in typescript/printers.ts:41
Parameters:
Name | Type |
---|---|
str | string |
Returns: string
Const
createParserFunction
▸ createParserFunction(type
: string): string
Defined in typescript/printers.ts:20
Parameters:
Name | Type |
---|---|
type | string |
Returns: string
createSchema
▸ createSchema(definition
: SchemaDefinition): string
Defined in typescript/printers.ts:12
Parameters:
Name | Type |
---|---|
definition | SchemaDefinition |
Returns: string
createTypeAlias
▸ createTypeAlias(alias
: string, type
: string): string
Defined in typescript/printers.ts:55
Parameters:
Name | Type |
---|---|
alias | string |
type | string |
Returns: string
createUnionType
▸ createUnionType(members
: string[]): string
Defined in typescript/printers.ts:49
Parameters:
Name | Type |
---|---|
members | string[] |
Returns: string