Files
kjol/tools/tsgo/internal/fourslash/tests/gen/navigationBarItemsItems_test.go
2026-07-09 16:50:43 -04:00

59 lines
1.3 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual navigationBarItemsItems"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestNavigationBarItemsItems(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// Interface
interface IPoint {
getDist(): number;
new(): IPoint;
(): any;
[x:string]: number;
prop: string;
}
/// Module
namespace Shapes {
// Class
export class Point implements IPoint {
constructor (public x: number, public y: number) { }
// Instance member
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
// Getter
get value(): number { return 0; }
// Setter
set value(newValue: number) { return; }
// Static member
static origin = new Point(0, 0);
// Static method
private static getOrigin() { return Point.origin; }
}
enum Values { value1, value2, value3 }
}
// Local variables
var p: IPoint = new Shapes.Point(3, 4);
var dist = p.getDist();`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineDocumentSymbol(t)
}