Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for Flow issue with 'String.raw' #3080

Merged
merged 1 commit into from May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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