Add tests to close issue 16121 (#18040)
This commit is contained in:
1 parent
aba13a2e36
commit
ae43bcf68c
2 files changed
+123
No files matched your search
@@ -0,0 +1,38 @@
|
||||
export type IntersectionType =
|
||||
& FirstPart
|
||||
// Presence of comment makes this non-idempotent
|
||||
& {
|
||||
an: string,
|
||||
object: string,
|
||||
type: string,
|
||||
}
|
||||
|
||||
|
||||
export type IntersectionType =
|
||||
& FirstPart
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
& {
|
||||
an: string,
|
||||
object: string,
|
||||
type: string,
|
||||
}
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Presence of comment is not a problem
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
@@ -250,6 +250,91 @@ class Foo {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`16121.ts format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export type IntersectionType =
|
||||
& FirstPart
|
||||
// Presence of comment makes this non-idempotent
|
||||
& {
|
||||
an: string,
|
||||
object: string,
|
||||
type: string,
|
||||
}
|
||||
|
||||
|
||||
export type IntersectionType =
|
||||
& FirstPart
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
& {
|
||||
an: string,
|
||||
object: string,
|
||||
type: string,
|
||||
}
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Presence of comment is not a problem
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
=====================================output=====================================
|
||||
export type IntersectionType = FirstPart &
|
||||
// Presence of comment makes this non-idempotent
|
||||
{
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type IntersectionType = FirstPart &
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
{
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Presence of comment is not a problem
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type IntersectionType =
|
||||
| FirstPart
|
||||
// Comment Line 1
|
||||
// Comment Line 2
|
||||
| {
|
||||
an: string;
|
||||
object: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`16207.ts format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
|
||||
Reference in new issue
Block a user