// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`argument-list-preserve-line.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
class Foo {
    constructor(
        @inject(Bar)
        private readonly bar: IBar,

        @inject(MyProcessor)
        private readonly myProcessor: IMyProcessor,

        @inject(InjectionTypes.AnotherThing)

        private readonly anotherThing: IAnotherThing | undefined,
    ) { }
}

=====================================output=====================================
class Foo {
  constructor(
    @inject(Bar)
    private readonly bar: IBar,

    @inject(MyProcessor)
    private readonly myProcessor: IMyProcessor,

    @inject(InjectionTypes.AnotherThing)
    private readonly anotherThing: IAnotherThing | undefined
  ) {}
}

================================================================================
`;

exports[`decorator-type-assertion.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
@(bind as ClassDecorator)
class Decorated {

}

@(<ClassDecorator>bind)
class Decorated {

}

=====================================output=====================================
@(bind as ClassDecorator)
class Decorated {}

@(<ClassDecorator>bind)
class Decorated {}

================================================================================
`;

exports[`decorators.js 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
export class TestTextFileService {
	constructor(
		@ILifecycleService lifecycleService,
	) {
	}
}

@commonEditorContribution
export class TabCompletionController {
}

@Component({
  selector: 'angular-component',
})
class AngularComponent {
  @Input() myInput: string;
}

class Class {
  method(
    @Decorator
    { prop1, prop2 }: Type
  ) {
    doSomething();
  }
}

class Class2 {
  method(
    @Decorator1
    @Decorator2
    { prop1, prop2 }: Type
  ) {
    doSomething();
  }
}

class Class3 {
  method(
    @Decorator
    { prop1_1, prop1_2 }: Type,
    { prop2_1, prop2_2 }: Type
  ) {
    doSomething();
  }
}

class Class4 {
  method(
    param1,
    @Decorator
    { prop1, prop2 }: Type
  ) {}
}

class Class5 {
  method(
    @Decorator { prop1 }: Type
  ) {}
}

=====================================output=====================================
export class TestTextFileService {
  constructor(@ILifecycleService lifecycleService) {}
}

@commonEditorContribution
export class TabCompletionController {}

@Component({
  selector: "angular-component"
})
class AngularComponent {
  @Input() myInput: string;
}

class Class {
  method(
    @Decorator
    { prop1, prop2 }: Type
  ) {
    doSomething();
  }
}

class Class2 {
  method(
    @Decorator1
    @Decorator2
    { prop1, prop2 }: Type
  ) {
    doSomething();
  }
}

class Class3 {
  method(
    @Decorator
    { prop1_1, prop1_2 }: Type,
    { prop2_1, prop2_2 }: Type
  ) {
    doSomething();
  }
}

class Class4 {
  method(
    param1,
    @Decorator
    { prop1, prop2 }: Type
  ) {}
}

class Class5 {
  method(@Decorator { prop1 }: Type) {}
}

================================================================================
`;

exports[`decorators-comments.js 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================

class Foo1 {
    @foo
    // comment
    async method() {}
}

class Foo2 {
    @foo
    // comment
    private method() {}
}

class Foo3 {
    @foo
    // comment
    *method() {}
}

class Foo4 {
    @foo
    // comment
    async *method() {}
}

class Something {
    @foo()
    // comment
    readonly property: Array<string>
}

class Something2 {
    @foo()
    // comment
    abstract property: Array<string>
}

class Something3 {
    @foo()
    // comment
    abstract method(): Array<string>
}

=====================================output=====================================
class Foo1 {
  @foo
  // comment
  async method() {}
}

class Foo2 {
  @foo
  // comment
  private method() {}
}

class Foo3 {
  @foo
  // comment
  *method() {}
}

class Foo4 {
  @foo
  // comment
  async *method() {}
}

class Something {
  @foo()
  // comment
  readonly property: Array<string>;
}

class Something2 {
  @foo()
  // comment
  abstract property: Array<string>;
}

class Something3 {
  @foo()
  // comment
  abstract method(): Array<string>;
}

================================================================================
`;

exports[`inline-decorators.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================

@d1
@d2(foo)
@d3.bar
@d4.baz()
class Class1 {}

class Class2 {
    @d1
    @d2(foo)
    @d3.bar
    @d4.baz()
    method1() {}

    @d1
    method2() {}

    @d2(foo)
    method3() {}

    @d3.bar
    method4() {}
}

class Class3 {
    @d1 fieldA;
    @d2(foo) fieldB;
    @d3.bar fieldC;
    @d4.baz() fieldD;

    constructor (
        @d1 private x: number,
        @d2(foo) private y: number,
        @d3('foo') private z: number,
        @d4({
            x: string
        }) private a: string,
    ) {}
}

@decorated class Foo {}

class Bar {
    @decorated method() {}
}

class MyContainerComponent {
  @ContentChildren(MyComponent) components: QueryListSomeBigName<MyComponentThat>;
}

=====================================output=====================================
@d1
@d2(foo)
@d3.bar
@d4.baz()
class Class1 {}

class Class2 {
  @d1
  @d2(foo)
  @d3.bar
  @d4.baz()
  method1() {}

  @d1
  method2() {}

  @d2(foo)
  method3() {}

  @d3.bar
  method4() {}
}

class Class3 {
  @d1 fieldA;
  @d2(foo) fieldB;
  @d3.bar fieldC;
  @d4.baz() fieldD;

  constructor(
    @d1 private x: number,
    @d2(foo) private y: number,
    @d3("foo") private z: number,
    @d4({
      x: string
    })
    private a: string
  ) {}
}

@decorated
class Foo {}

class Bar {
  @decorated method() {}
}

class MyContainerComponent {
  @ContentChildren(MyComponent) components: QueryListSomeBigName<
    MyComponentThat
  >;
}

================================================================================
`;

exports[`interface.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
// invalid place but shouldn't be removed

@hello()
interface MyInterface {
  id: string;
}

=====================================output=====================================
// invalid place but shouldn't be removed

@hello()
interface MyInterface {
  id: string;
}

================================================================================
`;
