1 | interface Location {
|
2 | line: number;
|
3 | column: number;
|
4 | }
|
5 | /**
|
6 | * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
7 | * optional, but they are useful for clients who store GraphQL documents in source files.
|
8 | * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
|
9 | * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
|
10 | * The `line` and `column` properties in `locationOffset` are 1-indexed.
|
11 | */
|
12 | export declare class Source {
|
13 | body: string;
|
14 | name: string;
|
15 | locationOffset: Location;
|
16 | constructor(body: string, name?: string, locationOffset?: Location);
|
17 | get [Symbol.toStringTag](): string;
|
18 | }
|
19 | /**
|
20 | * Test if the given value is a Source object.
|
21 | *
|
22 | * @internal
|
23 | */
|
24 | export declare function isSource(source: unknown): source is Source;
|
25 | export {};
|