Skip to content

Commit 0bb8500

Browse files
Workaround for Flow issue with 'String.raw' (#3080)
In preparation for TS migration
1 parent 33ec4ef commit 0bb8500

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

flow-typed/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ declare class String {
12771277
* @param callSite A well-formed template string call site representation.
12781278
* @param substitutions A set of substitution values.
12791279
*/
1280-
static raw(callSite: $Shape<{ raw: string, ... }>, ...substitutions: any[]): string;
1280+
static raw(callSite: string[], ...substitutions: any[]): string; // graphql-js HACK
12811281
}
12821282

12831283
declare class RegExp {

src/__testUtils__/kitchenSinkQuery.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// $FlowFixMe[incompatible-call]
21
export const kitchenSinkQuery: string = String.raw`
32
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
43
whoever123is: node(id: [123, 456]) {

src/language/__tests__/printer-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ describe('Printer: Query document', () => {
149149
expect(JSON.stringify(ast)).to.equal(astBeforePrintCall);
150150

151151
expect(printed).to.equal(
152-
// $FlowFixMe[incompatible-call]
153152
dedentString(String.raw`
154153
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
155154
whoever123is: node(id: [123, 456]) {

src/utilities/__tests__/printSchema-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ describe('Type System Printer', () => {
157157
});
158158

159159
expectPrintedSchema(schema).to.equal(
160-
// $FlowFixMe[incompatible-call]
161160
dedentString(String.raw`
162161
type Query {
163162
singleField(argOne: String = "tes\t de\fault"): String

0 commit comments

Comments
 (0)