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/type-printer/printBinaryExpression.js | tests/format/flow-repo/type-printer/printBinaryExpression.js | 'use babel';
/* @flow */
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import type {BinaryExpression} from './types';
function printBinaryExpression(
node: Bin... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type-printer/format.test.js | tests/format/flow-repo/type-printer/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/singleton/string.js | tests/format/flow-repo/singleton/string.js | /* @flow */
type NoSpaces = "foobar"
("foobar": NoSpaces);
type HasSpaces = "foo bar"
("foo bar": HasSpaces);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/singleton/number.js | tests/format/flow-repo/singleton/number.js | /* @flow */
function highlander(howMany: 1): number {
return howMany; // there can be only one!
}
highlander(1);
highlander(2); // error
type Foo = 1 | 2
function bar(num: Foo): number {
return num + 1;
}
bar(1);
bar(2);
bar(3); // error
type ComparatorResult = -1 | 0 | 1
function sort(fn: (x: any, y: any) =... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/singleton/boolean.js | tests/format/flow-repo/singleton/boolean.js | /* @flow */
function veryOptimistic(isThisAwesome: true): boolean {
return isThisAwesome;
}
var x : boolean = veryOptimistic(true);
var y : boolean = veryOptimistic(false); // error
function veryPessimistic(isThisAwesome: true): boolean {
return !isThisAwesome; // test bool conversion
}
var x : boolean = veryPe... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/singleton/format.test.js | tests/format/flow-repo/singleton/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_cycle/A.js | tests/format/flow-repo/incremental_cycle/A.js | // @flow
class A {
b: number;
c: string;
}
module.exports = A;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_cycle/C.js | tests/format/flow-repo/incremental_cycle/C.js | // @flow
var A = require ('./A');
import type B from './B';
class C extends A {
b: B;
}
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/incremental_cycle/B.js | tests/format/flow-repo/incremental_cycle/B.js | // @flow
var A = require ('./A');
import type C from './C';
class B extends A {
c: C;
}
module.exports = B;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_cycle/format.test.js | tests/format/flow-repo/incremental_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/incremental_cycle/tmp2/B.js | tests/format/flow-repo/incremental_cycle/tmp2/B.js | // @flow
var A = require ('./A');
//import type C from './C';
export type B = string;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_cycle/tmp2/format.test.js | tests/format/flow-repo/incremental_cycle/tmp2/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_cycle/tmp3/B.js | tests/format/flow-repo/incremental_cycle/tmp3/B.js | // @flow
var A = require ('./A');
import type C from './C';
export type B = string;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_cycle/tmp3/format.test.js | tests/format/flow-repo/incremental_cycle/tmp3/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_cycle/tmp1/C.js | tests/format/flow-repo/incremental_cycle/tmp1/C.js | // @flow
var A = require ('./A');
import type { B } from './B'
class C extends A {
b: B;
}
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/incremental_cycle/tmp1/B.js | tests/format/flow-repo/incremental_cycle/tmp1/B.js | // @flow
var A = require ('./A');
import type C from './C';
export type B = string;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_cycle/tmp1/format.test.js | tests/format/flow-repo/incremental_cycle/tmp1/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/switch/switch.js | tests/format/flow-repo/switch/switch.js | /**
* @flow
*/
function foo(
): number {
switch ('foo') {
case 'foo':
return 1;
}
return 2;
}
function bar() {
switch ('bar') {
case 'bar':
break;
default:
break;
}
}
function qux(b) {
var x = b? 0: "";
switch('qux') {
case '':
x = 0;
c... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/switch/more_switch.js | tests/format/flow-repo/switch/more_switch.js | /* @flow */
function foo(x): number {
switch (x) {
case 0:
case 1: return 1;
default: throw new Error('hi');
}
}
function bar(x) {
switch (x) {
case 0: break;
default: return;
}
1;
}
function baz(x): number {
switch (x) {
case 0: break;
case 1: return 1;
... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/switch/switch_default_fallthrough.js | tests/format/flow-repo/switch/switch_default_fallthrough.js | /**
* @flow
*/
function foo(x : mixed): string {
var a = "";
var b = "";
switch (x) {
case "foo":
a = 0;
default:
b = 0;
}
// a is now string | number
(a : string); // error, string | number ~/> string
(a : number); // error, string | number ~/> number
//... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/switch/trailing_cases.js | tests/format/flow-repo/switch/trailing_cases.js | /**
* trailing cases are allowed - spot checks that we handle them as usual
* @flow
*/
function f1(i) {
var x;
switch (i) {
case 0:
x = 0;
break;
case 1:
x = 1;
break;
default:
x = -1;
break;
case 2:
x = "2";
break;
}
var y:number = x; // error, number | string ~/> n... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/switch/format.test.js | tests/format/flow-repo/switch/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_not_found_errors/src/index.js | tests/format/flow-repo/module_not_found_errors/src/index.js | // @flow
require('module_completely_absent');
// node_modules/module_outside_of_root/ sits outside of the Flow project root.
// Flow should give a descriptive error about this
require('module_outside_of_root');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/module_not_found_errors/src/format.test.js | tests/format/flow-repo/module_not_found_errors/src/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/function_return.js | tests/format/flow-repo/return/function_return.js | class C {
foo() { }
bar() { return; }
fn(x:number) { return x; }
}
function f(x): number {
if (x > 1) {
return 42;
}
}
function g(x): ?number {
if (x > 1) {
return 42;
}
}
function h(x): number {
if (x > 1) {
return 42;
}
return;
}
function i(x): ?number {
if (x > 1) {
re... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/return/void.js | tests/format/flow-repo/return/void.js | /* This is a regression test. At one point we incorrectly inferred the return
type of functions that have an explicit `undefined` to be only `undefined` --
ignoring other possible exits. */
function f(b) {
if (b) {
return undefined;
} else {
return "nope";
}
}
(f(true): void); // error: string ~> v... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/return/format.test.js | tests/format/flow-repo/return/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/config_munging_underscores2/chain.js | tests/format/flow-repo/config_munging_underscores2/chain.js | /* @flow */
class A {
_property1: number;
static _sProperty: number;
constructor() {
this._property1 = 5;
}
_method1(): number {
return 1;
}
static _sMethod(): string {
return "some string";
}
}
A._sProperty = 48;
class B extends A {
_property1: string;
static _sProperty: string;
c... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_munging_underscores2/format.test.js | tests/format/flow-repo/config_munging_underscores2/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/more_annot/client_object.js | tests/format/flow-repo/more_annot/client_object.js | var o = require('./object');
var a:number = o.w.z.y;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/more_annot/super.js | tests/format/flow-repo/more_annot/super.js | class C { m() { } }
class D extends C { }
var d: { +m: () => void } = new D();
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/more_annot/object.js | tests/format/flow-repo/more_annot/object.js | var o1 = { x: 0, y: "" };
var o2 = { z: o1 }
var o3 = {};
o3.w = o2;
//declare var exports: { w: any };
module.exports = o3;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/more_annot/proto.js | tests/format/flow-repo/more_annot/proto.js | function Foo() { this.x = 0; }
Foo.prototype.m = function() { }
var o1: { x: number; m(): void } = new Foo();
var o2: Foo = new Foo();
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/more_annot/format.test.js | tests/format/flow-repo/more_annot/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/while/test.js | tests/format/flow-repo/while/test.js | class C {
m() { return new C; }
}
function blah() {}
var node: ?C = new C;
while (node) {
var parent = node.m();
var cloneable: C = node;
blah();
node = parent.m();
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/while/abnormal.js | tests/format/flow-repo/while/abnormal.js | /* @flow */
function foo(x: boolean) {
var ii = 10;
while (ii-- >= 0) {
if (x) {
continue;
}
return;
}
//console.log('this is still reachable');
}
function bar(x: boolean) {
var ii = 0;
while (ii > 0) {
return;
}
//console.log('this is still reachable');
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/while/format.test.js | tests/format/flow-repo/while/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/statics/funstatics.js | tests/format/flow-repo/statics/funstatics.js | function C() { }
C.prototype.f = function() { return C.g(0); }
C.g = function(x) { return x; };
var x:string = new C().f();
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/statics/class_statics.js | tests/format/flow-repo/statics/class_statics.js | class C {
static f(x:number) { }
static x:string;
}
C.g = function(x:string) { C.f(x); };
C.g(0);
var x:number = C.x;
C.x = 0; | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/statics/format.test.js | tests/format/flow-repo/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/conditional/conditional.js | tests/format/flow-repo/conditional/conditional.js | /* @flow */
function a(): number {
var x: ?string = null;
return x ? 1 : 0;
}
function b(): number {
var x: ?number = null;
return x != null ? x : 0;
}
function c(): number {
// equivalent to `return (x && 1) || 0`
var x = false;
var temp = (x ? 1 : x);
return temp ? temp : 0;
}
function d(): st... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/conditional/format.test.js | tests/format/flow-repo/conditional/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/config_file_extensions/test.js | tests/format/flow-repo/config_file_extensions/test.js | /*
* @flow
*/
function foo(x) {
var a: number = 'asdf';
return x * 10;
}
// This file should be ignored, so this should not result in an error
foo('Hello, world!');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_file_extensions/format.test.js | tests/format/flow-repo/config_file_extensions/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_decorators.warn/test.js | tests/format/flow-repo/esproposal_decorators.warn/test.js | /* @flow */
@decorator4
class Foo {
@decorator1
method1() {}
@decorator2
@decorator3
method2() {}
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/esproposal_decorators.warn/format.test.js | tests/format/flow-repo/esproposal_decorators.warn/format.test.js | runFormatTest(import.meta, ["flow"], { errors: { hermes: ["test.js"] } });
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_path/dir/a.js | tests/format/flow-repo/incremental_path/dir/a.js | // @flow
(require('b'): boolean);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/incremental_path/dir/format.test.js | tests/format/flow-repo/incremental_path/dir/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/unicode/format.test.js | tests/format/flow-repo/unicode/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/unicode/UnicodeUtils.js | tests/format/flow-repo/unicode/UnicodeUtils.js | /**
* @flow
*/
/**
* @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF]
* @return {boolean} Whether code-unit is in a surrogate (hi/low) range
*/
function inSurrogateRange(codeUnit) {
return 0xD800 <= codeUnit && codeUnit <= 0xDFFF;
}
/**
* Return the length of the original Unicode c... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/extensions/foo.js | tests/format/flow-repo/extensions/foo.js | var imp = require('./bar');
imp(1337);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/extensions/format.test.js | tests/format/flow-repo/extensions/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_only_vars/A.js | tests/format/flow-repo/type_only_vars/A.js | /**
* @flow
*/
class Foo {
}
class Bar {
}
module.exports = {
Foo: Foo,
Bar: Bar
};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_only_vars/good_shadowing.js | tests/format/flow-repo/type_only_vars/good_shadowing.js | /**
* @flow
*/
import typeof A from "./A.js";
import type {Foo, Bar as Baz} from "./A.js";
var A = require('./A.js');
var Foo = A.Foo;
var Baz = A.Bar;
// errors in prev block leave type bindings in place, so these are errors
var m = A;
var n = Foo;
var o = Baz;
// errors from value positions only
var a: Foo = ne... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_only_vars/import_type.js | tests/format/flow-repo/type_only_vars/import_type.js | /**
* @flow
*/
import typeof A from "./A.js";
import type {Foo, Bar as Baz} from "./A.js";
var actualA = require('./A.js');
// You can't use it as an identifier
var m = A;
var n = Foo;
var o = Baz;
// But using it in a type should still work
var a: Foo = new actualA.Foo();
(new actualA.Bar(): Baz);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_only_vars/bad_shadowing.js | tests/format/flow-repo/type_only_vars/bad_shadowing.js | /**
* @flow
*/
import typeof A from "./A.js";
import type {Foo, Bar as Baz} from "./A.js";
type duck = {
quack: () => string;
}
// These string types should confict with the imported types
var A: string = "Hello";
var Foo: string = "Goodbye";
var Baz: string = "Go away please";
// This string type should confli... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_only_vars/type_alias.js | tests/format/flow-repo/type_only_vars/type_alias.js | /**
* @flow
*/
type Foo = number;
// You can't use it as an identifier
var x = Foo;
// But using it in a type should still work
var a: Foo = 123;
var b: Array<Foo> = [123];
type c = Foo;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type_only_vars/format.test.js | tests/format/flow-repo/type_only_vars/format.test.js | runFormatTest(import.meta, ["flow"], {
errors: {
hermes: ["bad_shadowing.js", "good_shadowing.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_name_reducers_defaults/index.js | tests/format/flow-repo/haste_name_reducers_defaults/index.js | /* @flow */
(require('Module1'): boolean);
(require('Module2').foo(): boolean);
require('Module3');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/haste_name_reducers_defaults/format.test.js | tests/format/flow-repo/haste_name_reducers_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/haste_name_reducers_defaults/Module1.js | tests/format/flow-repo/haste_name_reducers_defaults/Module1.js | /* @flow */
var test = require('test');
(test: boolean);
module.exports = test;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/A.js | tests/format/flow-repo/declaration_files_incremental_haste/A.js | /* @providesModule A */
class Implementation {}
export function foo(): Implementation { return new Implementation; }
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/ExplicitProvidesModuleSameName.js | tests/format/flow-repo/declaration_files_incremental_haste/ExplicitProvidesModuleSameName.js | /*
* @providesModule ExplicitProvidesModuleSameName
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/ImplicitProvidesModule.js | tests/format/flow-repo/declaration_files_incremental_haste/ImplicitProvidesModule.js | /*
* @providesModule ImplicitProvidesModule
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/md5.js | tests/format/flow-repo/declaration_files_incremental_haste/md5.js | /* @providesModule md5 */
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/test.js | tests/format/flow-repo/declaration_files_incremental_haste/test.js | /* @flow */
var Implicit = require('ImplicitProvidesModule');
(Implicit.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
var ExplicitSameName = require('ExplicitProvidesModuleSameName');
(ExplicitSameName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/ExplicitProvidesModuleDifferentName.js | tests/format/flow-repo/declaration_files_incremental_haste/ExplicitProvidesModuleDifferentName.js | /*
* @providesModule ExplicitProvidesModuleDifferentName
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/format.test.js | tests/format/flow-repo/declaration_files_incremental_haste/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/declaration_files_incremental_haste/external/_d3/min.js | tests/format/flow-repo/declaration_files_incremental_haste/external/_d3/min.js | class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/external/_d3/format.test.js | tests/format/flow-repo/declaration_files_incremental_haste/external/_d3/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/declaration_files_incremental_haste/ws/index.js | tests/format/flow-repo/declaration_files_incremental_haste/ws/index.js | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false | |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/ws/format.test.js | tests/format/flow-repo/declaration_files_incremental_haste/ws/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/declaration_files_incremental_haste/ws/test/client.js | tests/format/flow-repo/declaration_files_incremental_haste/ws/test/client.js | var ws = require('../');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/ws/test/format.test.js | tests/format/flow-repo/declaration_files_incremental_haste/ws/test/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/declaration_files_incremental_haste/foo/bar/nested_test.js | tests/format/flow-repo/declaration_files_incremental_haste/foo/bar/nested_test.js | /* @flow */
var docblock = require('qux/docblock');
var min = require('d3/min.js');
var corge = require('qux/corge');
(docblock.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
(min.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
(corge.fun():... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_haste/foo/bar/format.test.js | tests/format/flow-repo/declaration_files_incremental_haste/foo/bar/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/this_type/contra.js | tests/format/flow-repo/this_type/contra.js | // Counterexample with contravariant this type
class C {
next: this; // error (see below for exploit): `this` should only appear in
// covariant positions
}
class D extends C { }
var d = new D();
(d: C).next = new C;
(d.next: D); // sneaky
class A {
foo<X: this>(that: X) { } // error: can't hide c... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/import.js | tests/format/flow-repo/this_type/import.js | // Check that imports are handled properly with this types
import { A1 } from './export';
import type { A2 } from './export';
import { A3 } from './export';
class B1 extends A1 {
foo(): B1 { return new B1(); } // error
}
(new B1().bar(): B1); // OK
class B3<X> extends A3<X> {
foo(): B3<X> { return new B3(); } /... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/statics.js | tests/format/flow-repo/this_type/statics.js | // supporting `this` type in statics
class A {
static make(): this { // factory method, whose return type `this` (still)
// describes instances of A or subclasses of A: the
// meaning of the `this` type is not changed simply by
// switching into... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/generics.js | tests/format/flow-repo/this_type/generics.js | class Generic<X> {
clone(): Generic<X> { return this; }
}
class Implicit<X> { arg: X; val: X; }
class ImplicitNumber extends Implicit { arg: number; }
(new ImplicitNumber().val: string) // error: number ~> string
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/export.js | tests/format/flow-repo/this_type/export.js | export class A1 {
foo(): this { return this; }
bar(): this { return this; }
}
export class A2<X> {
foo(): this { return this; }
bar(): this { return this; }
qux(x: X): X { return x; }
}
export class A3<X> extends A2<X> {}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/interface.js | tests/format/flow-repo/this_type/interface.js | interface I { xs: Array<this>; }
interface J { f(): J; }
class C {
xs: Array<C>;
f(): C { return this; }
}
function foo(c: C): I { return c; }
function bar(c: C): J { return c; }
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/test.js | tests/format/flow-repo/this_type/test.js | // Examples without `this` types (compare with examples below)
class Base {
foo() { return this; }
qux() { return new Base; }
bar() { return this; }
bar_caller() { return this.bar(); }
}
class Inherit extends Base { }
class Override extends Base {
foo() { return this; } // OK
qux() { return this; } // O... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/class_expr.js | tests/format/flow-repo/this_type/class_expr.js | /* @flow */
// issue #1191
const Thing = class Thing {
zark() {
this.x = 123; // error: property not found (must be declared)
}
};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/lib_client.js | tests/format/flow-repo/this_type/lib_client.js | (new DoublyLinkedList().prev(): DoublyLinkedList);
(new DoublyLinkedList().next(): DoublyLinkedList)
var MiniImmutable = require("mini-immutable");
class C {
map: MiniImmutable.OrderedMap<number,string>;
update() {
this.map = this.map.set(0,"");
}
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/self.js | tests/format/flow-repo/this_type/self.js | class A {
foo() { return this; } // return of foo is not annotated to get around
// substituting this below
bar(): this { return new A().foo(); } // same as returning : A, so error
qux(): this { return this.bar(); } // OK (don't cascade errors)
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/format.test.js | tests/format/flow-repo/this_type/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/this_type/lib/decl.js | tests/format/flow-repo/this_type/lib/decl.js | // The following declare classes use `this` types effectively to avoid type
// errors in ../lib_client.js. If support for `this` types in declare classes
// is disabled for perf reasons, these will produce warnings.
declare class LinkedList {
next(): this;
}
declare class DoublyLinkedList extends LinkedList {
prev... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/this_type/lib/format.test.js | tests/format/flow-repo/this_type/lib/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/indexer/A.js | tests/format/flow-repo/indexer/A.js | // No indexer should be fine
function foo0(): {} {
return { foo: "bar" }
}
// Matching indexer should be fine
function foo1(): {[key: string]: string} {
return { foo: "bar" }
}
// Indexer with different key type is an error when it matches
function foo2(): {[key: number]: string} {
return { foo: "bar" }
}
// M... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/indexer/multiple.js | tests/format/flow-repo/indexer/multiple.js | // @flow
let tests = [
function() {
({}: {
[k1: string]: string,
[k2: number]: number, // error: not supported (yet)
});
}
];
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/indexer/format.test.js | tests/format/flow-repo/indexer/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/coverage/crash.js | tests/format/flow-repo/coverage/crash.js | // This file triggers a violation of the "disjoint-or-nested ranges invariant"
// that we implicitly assume in type-at-pos and coverage implementations. In
// particular, when unchecked it causes a crash with coverage --color.
declare module foo {
}
declare module bar {
}
// TODO
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/coverage/no_pragma.js | tests/format/flow-repo/coverage/no_pragma.js | let x = 0;
(x: string);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/coverage/declare_module.js | tests/format/flow-repo/coverage/declare_module.js | // check coverage of declare module
declare module foo {
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/coverage/non-termination.js | tests/format/flow-repo/coverage/non-termination.js | // This file triggers a violation of the "disjoint-or-nested ranges invariant"
// that we implicitly assume in type-at-pos and coverage implementations. In
// particular, when unchecked it causes non-termination with coverage --color.
declare module foo {
}
declare module bar {
}
// TODO
declare class qux {
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/coverage/format.test.js | tests/format/flow-repo/coverage/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/export_type/cjs_with_types.js | tests/format/flow-repo/export_type/cjs_with_types.js | /* @flow */
export type talias4 = number;
export interface IFoo { prop: number };
module.exports = {}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/export_type/types_only2.js | tests/format/flow-repo/export_type/types_only2.js | /* @flow */
export type talias1 = number;
export type talias2 = number;
export interface IFoo2 { prop: string };
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/export_type/types_only.js | tests/format/flow-repo/export_type/types_only.js | /* @flow */
export type inlinedType1 = number;
var a: inlinedType1 = 42;
var b: inlinedType1 = 'asdf'; // Error: string ~> number
type standaloneType1 = number;
export type {standaloneType1};
type standaloneType2 = number;
export {standaloneType2}; // Error: Missing `type` keyword
export type {talias1, talias2 as t... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.