1 | import CodeGenerator from "apollo-codegen-core/lib/utilities/CodeGenerator";
|
2 | export interface Class {
|
3 | className: string;
|
4 | modifiers: string[];
|
5 | superClass?: string;
|
6 | adoptedProtocols?: string[];
|
7 | }
|
8 | export interface Struct {
|
9 | structName: string;
|
10 | adoptedProtocols?: string[];
|
11 | description?: string;
|
12 | namespace?: string;
|
13 | }
|
14 | export interface Protocol {
|
15 | protocolName: string;
|
16 | adoptedProtocols?: string[];
|
17 | }
|
18 | export interface Property {
|
19 | propertyName: string;
|
20 | typeName: string;
|
21 | isOptional?: boolean;
|
22 | description?: string;
|
23 | }
|
24 | export declare class SwiftSource {
|
25 | source: string;
|
26 | constructor(source: string);
|
27 | static string(string: string, trim?: boolean): SwiftSource;
|
28 | static multilineString(string: string): SwiftSource;
|
29 | static identifier(input: string): SwiftSource;
|
30 | static memberName(input: string): SwiftSource;
|
31 | static isValidParameterName(input: string): boolean;
|
32 | static raw(literals: TemplateStringsArray, ...placeholders: any[]): SwiftSource;
|
33 | toString(): string;
|
34 | concat(...sources: SwiftSource[]): SwiftSource;
|
35 | append(...sources: SwiftSource[]): void;
|
36 | static wrap(start: SwiftSource, maybeSource?: SwiftSource, end?: SwiftSource): SwiftSource | undefined;
|
37 | static join(maybeArray?: (SwiftSource | undefined)[], separator?: string): SwiftSource | undefined;
|
38 | }
|
39 | export declare function swift(literals: TemplateStringsArray, ...placeholders: any[]): SwiftSource;
|
40 | export declare class SwiftGenerator<Context> extends CodeGenerator<Context, {
|
41 | typeName: string;
|
42 | }, SwiftSource> {
|
43 | constructor(context: Context);
|
44 | multilineString(string: string, suppressMultilineStringLiterals: Boolean): void;
|
45 | comment(comment?: string, trim?: Boolean): void;
|
46 | deprecationAttributes(isDeprecated: boolean | undefined, deprecationReason: string | undefined): void;
|
47 | namespaceDeclaration(namespace: string | undefined, closure: Function): void;
|
48 | namespaceExtensionDeclaration(namespace: string | undefined, closure: Function): void;
|
49 | classDeclaration({ className, modifiers, superClass, adoptedProtocols }: Class, closure: Function): void;
|
50 | structDeclaration({ structName, description, adoptedProtocols, namespace }: Struct, outputIndividualFiles: boolean, closure: Function): void;
|
51 | propertyDeclaration({ propertyName, typeName, description }: Property): void;
|
52 | propertyDeclarations(properties: Property[]): void;
|
53 | protocolDeclaration({ protocolName, adoptedProtocols }: Protocol, closure: Function): void;
|
54 | protocolPropertyDeclaration({ propertyName, typeName }: Property): void;
|
55 | protocolPropertyDeclarations(properties: Property[]): void;
|
56 | }
|
57 | //# sourceMappingURL=language.d.ts.map |
\ | No newline at end of file |