repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/literal/enum.js
tests/format/flow-repo/literal/enum.js
var APIKeys = { AGE: 'age', NAME: 'name', }; module.exports = APIKeys;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/literal/enum_client.js
tests/format/flow-repo/literal/enum_client.js
var APIKeys = require('./enum'); // object that maps "AGE" to "age", "NAME" to "name" function foo(x: $Keys<typeof APIKeys>) { } foo("AGE"); foo("LOCATION"); // error function bar(x: $Keys<{age: number}>) { } bar(APIKeys.AGE); // not an error: APIKeys.AGE = "age" bar(APIKeys.NAME); // error: since "NAME" is not in th...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/literal/number.js
tests/format/flow-repo/literal/number.js
function test1(x: number): number { return -x; } function test2(x: string): number { return -x; } // sanity checks to make sure merging envs doesn't keep creating new NumT's // because of the UnaryMinusT's, causing nontermination function test3(x: number, flip_times: number): number { for (var i = 0; i < flip_t...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/literal/format.test.js
tests/format/flow-repo/literal/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/API.js
tests/format/flow-repo/haste_cycle/API.js
// @flow var OpenGraphObject = require('./models/OpenGraphObject.js');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/format.test.js
tests/format/flow-repo/haste_cycle/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/models/OpenGraphAction.js
tests/format/flow-repo/haste_cycle/models/OpenGraphAction.js
// @flow var OpenGraphValueContainer = require('./OpenGraphValueContainer.js');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/models/OpenGraphValueContainer.js
tests/format/flow-repo/haste_cycle/models/OpenGraphValueContainer.js
// @flow var OpenGraphObject = require('./OpenGraphObject.js');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/models/OpenGraphObject.js
tests/format/flow-repo/haste_cycle/models/OpenGraphObject.js
// @flow var OpenGraphValueContainer = require('./OpenGraphValueContainer.js');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_cycle/models/format.test.js
tests/format/flow-repo/haste_cycle/models/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/A.js
tests/format/flow-repo/call_properties/A.js
// You should be able to call objects with call properties function a(f: { (): string }, g: { (x: number): string } ): string { return f() + g(123); } // ...and get an error if the return type is wrong function b(f: { (): string }): number { return f(); } // ...or if the param type is wrong function c(f: { (x: nu...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/E.js
tests/format/flow-repo/call_properties/E.js
// Expecting properties that don't exist should be an error var a : { someProp: number } = function () {}; // Expecting properties that do exist should be fine var b : { apply: Function } = function () {}; // Expecting properties in the functions statics should be fine var f = function () {}; f.myProp = 123; var c : ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/D.js
tests/format/flow-repo/call_properties/D.js
// Multiple call properties should also be supported function a(f: { (): string; (x: number): string }): string { return f() + f(123); } // It should be fine when a function satisfies them all var b: { (): string; (x: number): string } = function (x?: number): string { return "hi"; }; // ...but should notice when...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/F.js
tests/format/flow-repo/call_properties/F.js
// You should be able to use an arrow function as an object with a call property var a: { (x: number): string } = (x) => x.toString() // ...and it should notice when the return type is wrong var b: { (x: number): number } = (x) => "hi" // ...or if the param type is wrong var c: { (x: string): string } = (x) => x.toF...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/C.js
tests/format/flow-repo/call_properties/C.js
// You should be able to use an object as a function function a(x: { (z: number): string }): (z: number) => string { return x; } // ...and it should notice when the return type is wrong function b(x: { (z: number): string }): (z: number) => number { return x; } // ...or if the param type is wrong function c(x: { ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/B.js
tests/format/flow-repo/call_properties/B.js
// You should be able to use a function as an object with a call property var a: { (x: number): string } = function (x: number): string { return "hi"; }; // ...and it should notice when the return type is wrong var b: { (x: number): number } = function (x: number): string { return "hi"; }; // ...or if the param type ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/call_properties/format.test.js
tests/format/flow-repo/call_properties/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/class_statics/test.js
tests/format/flow-repo/class_statics/test.js
class A { static x: number; static y: string; static foo(x: number) { } static bar(y: string) { } } A.qux = function(x: string) { } // error? class B extends A { static x: string; // error? static foo(x: string) { } // error? static main() { B.x = 0; // error B.x = ""; B.foo(0); // error ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/class_statics/format.test.js
tests/format/flow-repo/class_statics/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/vim_emacs_errors/test.js
tests/format/flow-repo/vim_emacs_errors/test.js
// @flow (123: string);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/vim_emacs_errors/format.test.js
tests/format/flow-repo/vim_emacs_errors/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/immutable_methods/test.js
tests/format/flow-repo/immutable_methods/test.js
class A { foo(): A { return this; } } class B extends A { foo(): B { return this; } } class C extends A {} var a: A = new B(); a.foo = function(): C { return new C(); }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/immutable_methods/format.test.js
tests/format/flow-repo/immutable_methods/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/libtest.js
tests/format/flow-repo/librec/libtest.js
foo(123); bar(123);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/format.test.js
tests/format/flow-repo/librec/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/lib/A/libA.js
tests/format/flow-repo/librec/lib/A/libA.js
declare function foo(x: number): void;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/lib/A/format.test.js
tests/format/flow-repo/librec/lib/A/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/lib/B/libB.js
tests/format/flow-repo/librec/lib/B/libB.js
declare function bar(x: string): void;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/librec/lib/B/format.test.js
tests/format/flow-repo/librec/lib/B/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/return_new/test.js
tests/format/flow-repo/return_new/test.js
function Foo() { return {}; } var foo: number = new Foo(); // error (returns object literal above) function Bar() { return 0; } var bar: number = new Bar(); // error (returns new object) function Qux() { } var qux: number = new Qux(); // error (returns new object) class A { } function B() { return new A(); } var a: ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/return_new/test2.js
tests/format/flow-repo/return_new/test2.js
declare class D { constructor(): { x: number }; // OK y: any; } var d = new D(); d.x = ""; // error, string ~/~ number (but property x is found) (new D: D); // error, new D is an object, D not in proto chain module.exports = D;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/return_new/format.test.js
tests/format/flow-repo/return_new/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objects/compatibility.js
tests/format/flow-repo/objects/compatibility.js
let tests = [ function(x: { x: { foo: string } }, y: { x: { bar: number } }) { x = y; // 2 errors: `foo` not found in y.x; `bar` not found in x.x }, function(x: { foo: string }, y: { foo: number }) { x = y; // 2 errors: string !~> number; number !~> string }, function(x: { x: { foo: string } }, y: {...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objects/conversion.js
tests/format/flow-repo/objects/conversion.js
/* @flow */ (Object({foo: 'bar'}): {foo: string}); (Object("123"): String); (Object(123): Number); (Object(true): Boolean); (Object(null): {}); (Object(undefined): {}); (Object(void(0)): {}); (Object(undefined): Number); // error var x = Object(null); x.foo = "bar"; var y = Object("123"); (y.charAt(0): string); var...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objects/objects.js
tests/format/flow-repo/objects/objects.js
/* @flow */ var x : {'123': string, bar: string} = {'123': 'val', bar: 'bar'}; (x.foo : string); // error, key doesn't exist (x['foo'] : string); // error, key doesn't exist (x[123] : boolean); // TODO: use the number's value to error here (x.bar: boolean); // error, string !~> boolean (x['123'] : boolean);...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objects/unaliased_assign.js
tests/format/flow-repo/objects/unaliased_assign.js
/** * test handling of unaliased value assignment. * * An unaliased object rvalue may be assigned to a supertype lvalue, * because later widening mutations on the rvalue can't break assumptions * made by other lvalues. * * However, upon assignment the rvalue must take on the type of the * lvalue, to avoid both ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/objects/format.test.js
tests/format/flow-repo/objects/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/keyvalue/keyvalue.js
tests/format/flow-repo/keyvalue/keyvalue.js
// @flow let tests = [ function(x: { [key: number]: string }) { (x[""]: number); } ];
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/keyvalue/format.test.js
tests/format/flow-repo/keyvalue/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_redirect/A.js
tests/format/flow-repo/module_redirect/A.js
declare module A { declare function foo(): string; }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_redirect/D.js
tests/format/flow-repo/module_redirect/D.js
/** * @providesModule D * @flow */ var bar1: string = require('A'); var bar2: string = require('B'); var bar3: string = require('C');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_redirect/C.js
tests/format/flow-repo/module_redirect/C.js
/** * @providesModule C * @flow */ module.exports = require('B');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_redirect/B.js
tests/format/flow-repo/module_redirect/B.js
/** * @providesModule B * @flow */ module.exports = require('A');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_redirect/format.test.js
tests/format/flow-repo/module_redirect/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_dupe/dupe1.js
tests/format/flow-repo/haste_dupe/dupe1.js
/** * Dupe provider 1/2 * @providesModule Dupe * @flow */ module.exports = "dupe1";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_dupe/dupe2.js
tests/format/flow-repo/haste_dupe/dupe2.js
/** * Dupe provider 2/2 * @providesModule Dupe * @flow */ module.exports = "dupe2";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_dupe/requires_dupe.js
tests/format/flow-repo/haste_dupe/requires_dupe.js
/** * depends on doubly-provided module * @flow */ var dupe = require('Dupe');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_dupe/format.test.js
tests/format/flow-repo/haste_dupe/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_defaults/classes.js
tests/format/flow-repo/type_param_defaults/classes.js
/* @flow */ class A<T> { p: T; constructor(p: T) { this.p = p; } } // Test out simple defaults class B<T = string> extends A<T> {} var b_number: B<number> = new B(123); var b_void: B<void> = new B(); var b_default: B<> = new B('hello'); var b_star: B<*> = new B(123); (b_number.p: boolean); // Error numbe...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_defaults/format.test.js
tests/format/flow-repo/type_param_defaults/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unreachable/typecheck.js
tests/format/flow-repo/unreachable/typecheck.js
/* @flow */ function test1(): string { return bar(); function bar() { return 0; } } // regression test for analysis after abnormal control flow: // consts must not become bot (EmptyT). function test2() { const n = 0; return; function f() { var x: typeof n = 0; // no error, n is still number ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unreachable/unreachable.js
tests/format/flow-repo/unreachable/unreachable.js
/* @flow */ function foo(x, y) { "use strict"; return bar(x) + baz(y); // function declaration is hoisted, should not generate warning function bar (ecks) { return x + ecks; } // assignment is not hoisted, should generate warning var baz = function (why) { return y + why; }; // variable de...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unreachable/format.test.js
tests/format/flow-repo/unreachable/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-256.js
tests/format/flow-repo/union/issue-256.js
declare class Myclass { myfun(myarray: Array<Function | string>): any; } declare var myclass: Myclass; myclass.myfun(["1", "2", "3", "4", "5", "6", function (ar) {}]) myclass.myfun(["1", "2", "3", "4", "5", "6", "7", function (ar) {}])
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/yuge.js
tests/format/flow-repo/union/yuge.js
/** * great big union used as type annotation will be flowed into itself. * List.mem check avoids pathology, as long as singletons aren't converted. * This is a band-aid, though: see second case. * @flow */ 'use strict'; class SecurityCheckupTypedLogger { _data: Data; setError(value: ErrorCode) { this._d...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
true
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/fields2.js
tests/format/flow-repo/union/fields2.js
class C { } class D { content: string|C; copyContent(content: C): string|C { this.content = content; return this.content; } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-963.js
tests/format/flow-repo/union/issue-963.js
/*** * unions with embedded intersections * @flow */ type t1 = { p1 : number }; type t2 = { p2: number } type t3 = { p3 : number } type intersected = t1 & t2; type union = intersected | t3; type union2 = t3 | intersected; const u1 : union = { p3 : 3 }; const u2 : union = { p1 : 1, p2 : ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-325.js
tests/format/flow-repo/union/issue-325.js
class Tag { constructor() { var a1: Array<Tag|string> = []; var a2: Array<Tag|string> = a1; } } type Node = Tag_ | string; class Tag_ { constructor() { var a1: Array<Node> = [new Tag_]; var a2: Array<Node> = a1; } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/test-lib.js
tests/format/flow-repo/union/test-lib.js
/* @providesModule test-lib */ class C { } module.exports = C;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/test.js
tests/format/flow-repo/union/test.js
var C = require('test-lib'); // TODO: spurious error! (replacing C with number makes the error go away) // type Foo<X> = Array<C> | Array<?C>; type Foo<X:?C> = Array<X>; // workaround var x:Array<C> = []; var y:Array<?C> = []; function foo<X>(x:Foo<X>) {} foo(x); foo(y); // TODO: spurious error! (replacing C with num...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/fields.js
tests/format/flow-repo/union/fields.js
class C { x: ?number|string; constructor() { this.x = null; } }
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-198.js
tests/format/flow-repo/union/issue-198.js
var p = new Promise(function(resolve, reject) { resolve(5); }) .then(function(num) { return num.toFixed(); }) .then(function(str) { // This should fail because str is string, not number return str.toFixed(); });
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-17.js
tests/format/flow-repo/union/issue-17.js
/* @flow */ type T = {type: "a"; a: number} | {type: "b"; b: string}; var l: Array<T> = [ {type: "a", a: 1}, {type: "a", a: 2}, {type: "a", a: 3}, {type: "a", a: 4}, {type: "b", b: "monkey"}, {type: "b", b: "gorilla"}, {type: "b", b: "giraffe"}, {type: "b", b: "penguin"}, ];
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-324.js
tests/format/flow-repo/union/issue-324.js
/* @flow */ class Foo{}; class Bar{}; var foostr: Foo | string = new Foo(); var barstr: Bar | string = new Bar(); foostr = barstr;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/blowup.js
tests/format/flow-repo/union/blowup.js
// @flow export type Select = { expression: ArithmeticExpression; alias: ?string; } export class Query { _select: Array<Select> = []; select(expr: ArithmeticExpression): this { this._select.push ({ expression: expr, alias: '', }); return this; } } export class BinaryExpression<T: A...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/type-app.js
tests/format/flow-repo/union/type-app.js
/** * @flow */ class LocalClass<T> {} var a: LocalClass<number> | number = 123; // Iterator is defined in a lib file, so the speculative algorithm for the // union type would incorrectly succeed for Iterator<number>. Only later during // the merge would we fine the error, but it would be too late. The diff that //...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-582.js
tests/format/flow-repo/union/issue-582.js
/*** * nested unions * @flow */ // inline var nested1: ('foo' | 'bar') | 'baz' = 'baz'; // through tvars type FooBar = 'foo' | 'bar'; type Baz = 'baz'; type FooBarBaz = FooBar | Baz; var nested2: FooBarBaz = 'baz';
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-326.js
tests/format/flow-repo/union/issue-326.js
var numberAndStringArr:Array<number|string> = [1,2]; var stringArr:Array<string> = ['a','b']; var result = numberAndStringArr.concat(stringArr); // no error
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/union.js
tests/format/flow-repo/union/union.js
function bar(x: Document | string): void { } bar(0); class C { } class D { } function CD(b) { var E = b? C: D; var c:C = new E(); // error, since E could be D, and D is not a subtype of C function qux(e: E) { } // this annotation is an error: is it C, or is it D? function qux2(e: C | D) { } // OK qux2(new C)...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-323.js
tests/format/flow-repo/union/issue-323.js
var Foo = require("./issue-323-lib"); var foo = new Foo(); var foostr: Foo | string = foo;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/issue-323-lib.js
tests/format/flow-repo/union/issue-323-lib.js
/* @flow */ class Foo {} module.exports = Foo;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/union/format.test.js
tests/format/flow-repo/union/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_export_star_as.ignore/source.js
tests/format/flow-repo/esproposal_export_star_as.ignore/source.js
// @flow export var str = 'asdf'; export var num = 42;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_export_star_as.ignore/test.js
tests/format/flow-repo/esproposal_export_star_as.ignore/test.js
// @flow export * as source from "./source";
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_export_star_as.ignore/dest.js
tests/format/flow-repo/esproposal_export_star_as.ignore/dest.js
// @flow import {source} from "./test"; var a: number = source.num; var b: string = source.num; // Error: num ~> string var c: string = source.str; var d: number = source.str; // Ignored error: num ~> string
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_export_star_as.ignore/format.test.js
tests/format/flow-repo/esproposal_export_star_as.ignore/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/fetch.js
tests/format/flow-repo/fetch/fetch.js
/* @flow */ // most of the details are tested in the separate file // here I test the basic usage const myRequest = new Request('http://google.com'); const a: Promise<string> = fetch(myRequest) .then(response => response.text()); const b: Promise<string> = fetch(myRequest); // incorrect var myInit = { method: ...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/urlsearchparams.js
tests/format/flow-repo/fetch/urlsearchparams.js
/* @flow */ const a = new URLSearchParams("key1=value1"); // correct const b = new URLSearchParams(['key1', 'value1']); // not correct const c = new URLSearchParams({'key1': 'value1'}); // not correct const d = new URLSearchParams(c); // correct const e: URLSearchParams = new URLSearchParams(); // correct e.append('ke...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/request.js
tests/format/flow-repo/fetch/request.js
/* @flow */ const a: Request = new Request(); // incorrect const b: Request = new Request('http://example.org'); // correct const c: Request = new Request(b); // correct const d: Request = new Request(c.clone()); // correct (doesn't make much sense though) const e: Request = new Request(b, c); // incorrect const f: Re...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/headers.js
tests/format/flow-repo/fetch/headers.js
/* @flow */ const a = new Headers("'Content-Type': 'image/jpeg'"); // not correct const b = new Headers(['Content-Type', 'image/jpeg']); // not correct const c = new Headers({'Content-Type': 'image/jpeg'}); // correct const d = new Headers(c); // correct const e: Headers = new Headers(); // correct e.append('Content-T...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/response.js
tests/format/flow-repo/fetch/response.js
/* @flow */ const a: Response = new Response(); // correct const b: Response = new Response(new Blob()); // correct const c: Response = new Response(new FormData()); // correct new Response("", { status: 404 }); // correct new Response(null, { status: 204 }); // correct new Response("", { status: "404" }); // incorrec...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/fetch/format.test.js
tests/format/flow-repo/fetch/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/facebook_fbt_some/main.js
tests/format/flow-repo/facebook_fbt_some/main.js
// @flow (<fbt />: number); (<fbt />: string); // Error (the libdef in this test marks fbt as number)
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/facebook_fbt_some/format.test.js
tests/format/flow-repo/facebook_fbt_some/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/facebook_fbt_some/flow-typed/fbt.js
tests/format/flow-repo/facebook_fbt_some/flow-typed/fbt.js
type Fbt = number
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/facebook_fbt_some/flow-typed/format.test.js
tests/format/flow-repo/facebook_fbt_some/flow-typed/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_variance2/promise.js
tests/format/flow-repo/type_param_variance2/promise.js
/** * Here the definition of Promise<T> is routed to the class Promise * in the user-specified library libs/Promise.js * * In such situations we must desugar async/await primitives * to the shadowed library definition. * * @flow */ async function foo(x: boolean): Promise<?{bar: string}> { if (x) { return...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_variance2/format.test.js
tests/format/flow-repo/type_param_variance2/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_variance2/libs/Promise.js
tests/format/flow-repo/type_param_variance2/libs/Promise.js
// Copyright 2004-present Facebook. All Rights Reserved. // These annotations are copy/pasted from the built-in Flow definitions for // Native Promises (https://phabricator.fb.com/P19792689), // with www-specific additions added in. // Any definitions here will override similarly-named ones in // library files declar...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_param_variance2/libs/format.test.js
tests/format/flow-repo/type_param_variance2/libs/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental/dup_a.js
tests/format/flow-repo/incremental/dup_a.js
/* @providesModule IncrModuleA */ var x:string = 0;
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental/b.js
tests/format/flow-repo/incremental/b.js
/* @providesModule IncrModuleB @flow */ var A = require('IncrModuleA');
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental/a.js
tests/format/flow-repo/incremental/a.js
/* @providesModule IncrModuleA */
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental/format.test.js
tests/format/flow-repo/incremental/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/path_node__modules/foo.js
tests/format/flow-repo/node_tests/path_node__modules/foo.js
var x = require('bar_lib/src/lib/bar'); console.log(x);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/path_node__modules/format.test.js
tests/format/flow-repo/node_tests/path_node__modules/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/package_file_node__modules/foo/foo.js
tests/format/flow-repo/node_tests/package_file_node__modules/foo/foo.js
var x: string = require('bar_lib'); // 'bar_lib' does not work! console.log(x);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/package_file_node__modules/foo/format.test.js
tests/format/flow-repo/node_tests/package_file_node__modules/foo/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/process/nextTick.js
tests/format/flow-repo/node_tests/process/nextTick.js
/* @flow */ process.nextTick(() => {}); process.nextTick( (a: string, b: number, c: boolean) => {}, 'z', 1, true ); process.nextTick( (a: string, b: number, c: boolean) => {}, 0, // Error: number ~> string 1, null // Error: null ~> boolean ); process.nextTick( (a: string, b: number, c: boolean) =>...
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false
prettier/prettier
https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_tests/process/format.test.js
tests/format/flow-repo/node_tests/process/format.test.js
runFormatTest(import.meta, ["flow"]);
javascript
MIT
ae0e00df55d47274cc53db8d2cdcd064849e088d
2026-01-04T14:57:20.107180Z
false