2017-05-23 22:33:18 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`abstract_class.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-05-23 22:34:40 +03:00
|
|
|
abstract class AbstractRule {
|
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
* Failures will be filtered based on \`tslint:disable\` comments by tslint.
|
|
|
|
* This method now does nothing.
|
|
|
|
*/
|
|
|
|
filterFailures() {}
|
|
|
|
}
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-05-23 22:34:40 +03:00
|
|
|
abstract class AbstractRule {
|
|
|
|
/**
|
2017-10-08 12:34:24 +03:00
|
|
|
* @deprecated
|
|
|
|
* Failures will be filtered based on \`tslint:disable\` comments by tslint.
|
|
|
|
* This method now does nothing.
|
|
|
|
*/
|
2017-05-23 22:34:40 +03:00
|
|
|
filterFailures() {}
|
|
|
|
}
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-05-23 22:34:40 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`jsx.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-06-07 22:57:03 +03:00
|
|
|
var example1 = <div>
|
|
|
|
https://test
|
|
|
|
</div>;
|
|
|
|
|
|
|
|
var example2 = <div>
|
|
|
|
/*test*/
|
|
|
|
</div>;
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-06-22 19:19:44 +03:00
|
|
|
var example1 = <div>https://test</div>;
|
2017-06-07 22:57:03 +03:00
|
|
|
|
2017-06-22 19:19:44 +03:00
|
|
|
var example2 = <div>/*test*/</div>;
|
2017-06-07 22:57:03 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-06-07 22:57:03 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`location.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-06-08 01:05:46 +03:00
|
|
|
function x({
|
|
|
|
x,
|
|
|
|
y,
|
|
|
|
}: {
|
|
|
|
// Hello world.
|
|
|
|
x: string,
|
|
|
|
// Yoyo.
|
|
|
|
y: string,
|
|
|
|
}) {}
|
|
|
|
|
|
|
|
export interface ApplicationEventData {
|
|
|
|
registerBroadcastReceiver(onReceiveCallback: (
|
|
|
|
context: any /* android.content.Context */,
|
|
|
|
intent: any /* android.content.Intent */
|
|
|
|
) => void): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type WrappedFormUtils = {
|
|
|
|
getFieldDecorator(id: string, options?: {
|
|
|
|
/** 子节点的值的属性,如 Checkbox 的是 'checked' */
|
|
|
|
valuePropName?: string;
|
|
|
|
/** 子节点的初始值,类型、可选值均由子节点决定 */
|
|
|
|
initialValue?: any;
|
|
|
|
/** 收集子节点的值的时机 */
|
|
|
|
trigger?: string;
|
|
|
|
/** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */
|
|
|
|
getValueFromEvent?: (...args: any[]) => any;
|
|
|
|
/** 校验子节点值的时机 */
|
|
|
|
validateTrigger?: string | string[];
|
|
|
|
/** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */
|
|
|
|
rules?: ValidationRule[];
|
|
|
|
/** 是否和其他控件互斥,特别用于 Radio 单选控件 */
|
|
|
|
exclusive?: boolean;
|
|
|
|
}): (node: React.ReactNode) => React.ReactNode;
|
|
|
|
};
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-06-08 01:05:46 +03:00
|
|
|
function x({
|
|
|
|
x,
|
|
|
|
y
|
|
|
|
}: {
|
|
|
|
// Hello world.
|
|
|
|
x: string;
|
|
|
|
// Yoyo.
|
|
|
|
y: string;
|
|
|
|
}) {}
|
|
|
|
|
|
|
|
export interface ApplicationEventData {
|
|
|
|
registerBroadcastReceiver(
|
|
|
|
onReceiveCallback: (
|
|
|
|
context: any /* android.content.Context */,
|
|
|
|
intent: any /* android.content.Intent */
|
|
|
|
) => void
|
|
|
|
): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type WrappedFormUtils = {
|
|
|
|
getFieldDecorator(
|
|
|
|
id: string,
|
|
|
|
options?: {
|
|
|
|
/** 子节点的值的属性,如 Checkbox 的是 'checked' */
|
|
|
|
valuePropName?: string;
|
|
|
|
/** 子节点的初始值,类型、可选值均由子节点决定 */
|
|
|
|
initialValue?: any;
|
|
|
|
/** 收集子节点的值的时机 */
|
|
|
|
trigger?: string;
|
|
|
|
/** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */
|
|
|
|
getValueFromEvent?: (...args: any[]) => any;
|
|
|
|
/** 校验子节点值的时机 */
|
|
|
|
validateTrigger?: string | string[];
|
|
|
|
/** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */
|
|
|
|
rules?: ValidationRule[];
|
|
|
|
/** 是否和其他控件互斥,特别用于 Radio 单选控件 */
|
|
|
|
exclusive?: boolean;
|
|
|
|
}
|
|
|
|
): (node: React.ReactNode) => React.ReactNode;
|
|
|
|
};
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-06-08 01:05:46 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`mapped_types.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2018-05-05 21:43:53 +03:00
|
|
|
type A = {
|
|
|
|
// commentA
|
|
|
|
[a in A]: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
type B = {
|
|
|
|
/* commentB */ [b in B]: string
|
|
|
|
}
|
|
|
|
|
|
|
|
type C = {
|
|
|
|
[/* commentC */ c in C]: string
|
|
|
|
}
|
|
|
|
|
|
|
|
type D = {
|
|
|
|
[d /* commentD */ in D]: string
|
|
|
|
}
|
|
|
|
|
|
|
|
type E = {
|
|
|
|
[e in /* commentE */ E]: string
|
|
|
|
}
|
|
|
|
|
|
|
|
type F = {
|
|
|
|
[f in F /* commentF */]: string
|
|
|
|
}
|
|
|
|
|
|
|
|
type G = {
|
|
|
|
[g in G] /* commentG */: string
|
|
|
|
}
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2018-05-05 21:43:53 +03:00
|
|
|
type A = {
|
|
|
|
// commentA
|
|
|
|
[a in A]: string
|
|
|
|
};
|
|
|
|
|
|
|
|
type B = { /* commentB */ [b in B]: string };
|
|
|
|
|
|
|
|
type C = { [/* commentC */ c in C]: string };
|
|
|
|
|
|
|
|
type D = { [d /* commentD */ in D]: string };
|
|
|
|
|
|
|
|
type E = { [e in /* commentE */ E]: string };
|
|
|
|
|
|
|
|
type F = { [f in F /* commentF */]: string };
|
|
|
|
|
|
|
|
type G = { [g in G /* commentG */]: string };
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2018-05-05 21:43:53 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`methods.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-10-08 12:34:24 +03:00
|
|
|
export class Point {
|
|
|
|
/**
|
|
|
|
* Does something.
|
|
|
|
*/
|
|
|
|
foo() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does something else.
|
|
|
|
*/
|
|
|
|
bar() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does
|
|
|
|
* something
|
|
|
|
* much
|
|
|
|
* better
|
|
|
|
* than
|
|
|
|
* the
|
|
|
|
* rest.
|
|
|
|
*/
|
|
|
|
baz() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Buzz-Fizz.
|
|
|
|
* Note: This is indented too far.
|
|
|
|
*/
|
|
|
|
fizzBuzz() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Turns the given string into pig-latin.
|
|
|
|
*/
|
|
|
|
pigLatinize(value: string) {
|
|
|
|
/**
|
|
|
|
* This is a block comment inside of a method.
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* One
|
|
|
|
* Two
|
|
|
|
* Three
|
|
|
|
* Four
|
|
|
|
*/
|
|
|
|
mismatchedIndentation() {}
|
|
|
|
|
|
|
|
}
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-10-08 12:34:24 +03:00
|
|
|
export class Point {
|
|
|
|
/**
|
|
|
|
* Does something.
|
|
|
|
*/
|
|
|
|
foo() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does something else.
|
|
|
|
*/
|
|
|
|
bar() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does
|
|
|
|
* something
|
|
|
|
* much
|
|
|
|
* better
|
|
|
|
* than
|
|
|
|
* the
|
|
|
|
* rest.
|
|
|
|
*/
|
|
|
|
baz() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Buzz-Fizz.
|
|
|
|
* Note: This is indented too far.
|
|
|
|
*/
|
|
|
|
fizzBuzz() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Turns the given string into pig-latin.
|
|
|
|
*/
|
|
|
|
pigLatinize(value: string) {
|
|
|
|
/**
|
|
|
|
* This is a block comment inside of a method.
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* One
|
|
|
|
* Two
|
|
|
|
* Three
|
|
|
|
* Four
|
|
|
|
*/
|
|
|
|
mismatchedIndentation() {}
|
|
|
|
}
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-10-08 12:34:24 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`type-parameters.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-06-14 13:10:03 +03:00
|
|
|
functionName<A /* A comment */>();
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-06-14 13:10:03 +03:00
|
|
|
functionName<A /* A comment */>();
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-06-14 13:10:03 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`types.ts 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["typescript"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-05-23 22:33:18 +03:00
|
|
|
(() => {
|
|
|
|
// swallow error and fallback to using directory as path
|
|
|
|
}) as string[];
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-05-23 22:33:18 +03:00
|
|
|
(() => {
|
|
|
|
// swallow error and fallback to using directory as path
|
|
|
|
}) as string[];
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-05-23 22:33:18 +03:00
|
|
|
`;
|