mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
fix(33286): add outlining for arrow function with one parameter (#38631)
This commit is contained in:
@@ -1,14 +1,84 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function f(x: number, y: number)[| {
|
||||
//// return x + y;
|
||||
////[|(
|
||||
//// a: number,
|
||||
//// b: number
|
||||
////) => {
|
||||
//// return a + b;
|
||||
////}|]
|
||||
/////
|
||||
////(a: number, b: number) => [|{
|
||||
//// return a + b;
|
||||
////}|]
|
||||
////
|
||||
////function g[|(
|
||||
//// x: number,
|
||||
//// y: number,
|
||||
////): number {
|
||||
//// return x + y;
|
||||
////const f1 = function[| (
|
||||
//// a: number
|
||||
//// b: number
|
||||
////) {
|
||||
//// return a + b;
|
||||
////}|]
|
||||
////
|
||||
////const f2 = function (a: number, b: number)[| {
|
||||
//// return a + b;
|
||||
////}|]
|
||||
////
|
||||
////function f3[| (
|
||||
//// a: number
|
||||
//// b: number
|
||||
////) {
|
||||
//// return a + b;
|
||||
////}|]
|
||||
////
|
||||
////function f4(a: number, b: number)[| {
|
||||
//// return a + b;
|
||||
////}|]
|
||||
////
|
||||
////class Foo[| {
|
||||
//// constructor[|(
|
||||
//// a: number,
|
||||
//// b: number
|
||||
//// ) {
|
||||
//// this.a = a;
|
||||
//// this.b = b;
|
||||
//// }|]
|
||||
////
|
||||
//// m1[|(
|
||||
//// a: number,
|
||||
//// b: number
|
||||
//// ) {
|
||||
//// return a + b;
|
||||
//// }|]
|
||||
////
|
||||
//// m1(a: number, b: number)[| {
|
||||
//// return a + b;
|
||||
//// }|]
|
||||
////}|]
|
||||
////
|
||||
////declare function foo(props: any): void;
|
||||
////foo(
|
||||
//// a =>[| {
|
||||
////
|
||||
//// }|]
|
||||
////)
|
||||
////
|
||||
////foo(
|
||||
//// (a) =>[| {
|
||||
////
|
||||
//// }|]
|
||||
////)
|
||||
////
|
||||
////foo(
|
||||
//// (a, b, c) =>[| {
|
||||
////
|
||||
//// }|]
|
||||
////)
|
||||
////
|
||||
////foo([|
|
||||
//// (a,
|
||||
//// b,
|
||||
//// c) => {
|
||||
////
|
||||
//// }|]
|
||||
////)
|
||||
|
||||
verify.outliningSpansInCurrentFile(test.ranges());
|
||||
|
||||
Reference in New Issue
Block a user