kittenipc/kitcom/internal/tsgo/fourslash/tests/gen/quickInfoInheritDoc_test.go
2025-10-15 10:12:44 +03:00

77 lines
1.8 KiB
Go

package fourslash_test
import (
"testing"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
)
func TestQuickInfoInheritDoc(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @noEmit: true
// @allowJs: true
// @Filename: quickInfoInheritDoc.ts
abstract class BaseClass {
/**
* Useful description always applicable
*
* @returns {string} Useful description of return value always applicable.
*/
public static doSomethingUseful(stuff?: any): string {
throw new Error('Must be implemented by subclass');
}
/**
* BaseClass.func1
* @param {any} stuff1 BaseClass.func1.stuff1
* @returns {void} BaseClass.func1.returns
*/
public static func1(stuff1: any): void {
}
/**
* Applicable description always.
*/
public static readonly someProperty: string = 'general value';
}
class SubClass extends BaseClass {
/**
* @inheritDoc
*
* @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter.
*/
public static /*1*/doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string {
let useful = '';
// do something useful to useful
return useful;
}
/**
* @inheritDoc
* @param {any} stuff1 SubClass.func1.stuff1
* @returns {void} SubClass.func1.returns
*/
public static /*2*/func1(stuff1: any): void {
}
/**
* text over tag
* @inheritDoc
* text after tag
*/
public static readonly /*3*/someProperty: string = 'specific to this class value'
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineHover(t)
}