Skip to content

Commit

Permalink
Workaround for Flow issue with 'String.raw' (#3080)
Browse files Browse the repository at this point in the history
In preparation for TS migration
  • Loading branch information
IvanGoncharov committed May 12, 2021
1 parent 33ec4ef commit 0bb8500
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion flow-typed/core.js
Expand Up @@ -1277,7 +1277,7 @@ declare class String {
* @param callSite A well-formed template string call site representation.
* @param substitutions A set of substitution values.
*/
static raw(callSite: $Shape<{ raw: string, ... }>, ...substitutions: any[]): string;
static raw(callSite: string[], ...substitutions: any[]): string; // graphql-js HACK
}

declare class RegExp {
Expand Down
1 change: 0 additions & 1 deletion src/__testUtils__/kitchenSinkQuery.js
@@ -1,4 +1,3 @@
// $FlowFixMe[incompatible-call]
export const kitchenSinkQuery: string = String.raw`
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
whoever123is: node(id: [123, 456]) {
Expand Down
1 change: 0 additions & 1 deletion src/language/__tests__/printer-test.js
Expand Up @@ -149,7 +149,6 @@ describe('Printer: Query document', () => {
expect(JSON.stringify(ast)).to.equal(astBeforePrintCall);

expect(printed).to.equal(
// $FlowFixMe[incompatible-call]
dedentString(String.raw`
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
whoever123is: node(id: [123, 456]) {
Expand Down
1 change: 0 additions & 1 deletion src/utilities/__tests__/printSchema-test.js
Expand Up @@ -157,7 +157,6 @@ describe('Type System Printer', () => {
});

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

0 comments on commit 0bb8500

Please sign in to comment.