2014-08-11 22:15:07 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
////// interface
|
|
|
|
////interface IFoo[| {
|
|
|
|
//// getDist(): number;
|
|
|
|
////}|]
|
|
|
|
////
|
|
|
|
////// class members
|
|
|
|
////class Foo[| {
|
|
|
|
//// constructor()[| {
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// public foo(): number[| {
|
|
|
|
//// return 0;
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// public get X()[| {
|
|
|
|
//// return 1;
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// public set X(v: number)[| {
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// public member = function f()[| {
|
|
|
|
////
|
|
|
|
//// }|]
|
|
|
|
////}|]
|
2014-09-29 07:33:00 +02:00
|
|
|
////switch(1)[| {
|
|
|
|
//// case 1: break;
|
|
|
|
////}|]
|
|
|
|
////
|
|
|
|
////var array =[| [
|
|
|
|
//// 1,
|
|
|
|
//// 2
|
|
|
|
////]|]
|
2014-08-11 22:15:07 +02:00
|
|
|
////
|
|
|
|
////// modules
|
|
|
|
////module m1[| {
|
|
|
|
//// module m2[| { }|]
|
|
|
|
//// module m3[| {
|
|
|
|
//// function foo()[| {
|
|
|
|
////
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// interface IFoo2[| {
|
|
|
|
////
|
|
|
|
//// }|]
|
|
|
|
////
|
|
|
|
//// class foo2 implements IFoo2[| {
|
|
|
|
////
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
////}|]
|
|
|
|
////
|
|
|
|
////// function declaration
|
|
|
|
////function foo(): number[| {
|
|
|
|
//// return 0;
|
|
|
|
////}|]
|
|
|
|
////
|
|
|
|
////// function expressions
|
|
|
|
////(function f()[| {
|
|
|
|
////
|
|
|
|
////}|])
|
|
|
|
////
|
|
|
|
////// trivia handeling
|
|
|
|
////class ClassFooWithTrivia[| /* some comments */
|
|
|
|
//// /* more trivia */ {
|
|
|
|
////
|
|
|
|
////
|
|
|
|
//// /*some trailing trivia */
|
|
|
|
////}|] /* even more */
|
|
|
|
////
|
|
|
|
////// object literals
|
2014-08-13 00:47:57 +02:00
|
|
|
////var x =[|{
|
2014-08-11 22:15:07 +02:00
|
|
|
//// a:1,
|
|
|
|
//// b:2,
|
2014-08-13 00:47:57 +02:00
|
|
|
//// get foo()[| {
|
2014-08-11 22:15:07 +02:00
|
|
|
//// return 1;
|
|
|
|
//// }|]
|
|
|
|
////}|]
|
|
|
|
//////outline with deep nesting
|
|
|
|
////module m1[|{
|
|
|
|
//// module m2[| {
|
|
|
|
//// module m3[| {
|
|
|
|
//// module m4[| {
|
|
|
|
//// module m5[| {
|
|
|
|
//// module m6[| {
|
|
|
|
//// module m7[| {
|
|
|
|
//// module m8[| {
|
|
|
|
//// module m9[| {
|
|
|
|
//// module m10[| {
|
|
|
|
//// module m11 {
|
|
|
|
//// module m12 {
|
|
|
|
//// export interface IFoo {
|
|
|
|
//// }
|
|
|
|
//// }
|
|
|
|
//// }
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
//// }|]
|
|
|
|
////}|]
|
|
|
|
////
|
|
|
|
//////outline after a deeply nested node
|
|
|
|
////class AfterNestedNodes[| {
|
|
|
|
////}|]
|
|
|
|
|
|
|
|
verify.outliningSpansInCurrentFile(test.ranges());
|