Is there any way to attach type definition manually to GDScript?

Godot Version

4.3-mono

Question

This is a cross-language problem, between GDScript and C#.
I’m rewriting something written in GDScript to C#, and the problem is that I can’t use the C# types in GDScript.
So is there any way to do that?

Such as:

A.cs

using Godot;
public partial class A: GodotObject
{
    public int a = 0;
}

test.gd

extends Node

func _ready() -> void:
    var a = preload("res://A.cs").new()
    a.a # I hope I can get the type hint when writing this line, or mark the type A

Try
var a = preload("res://A.cs").new() as A

I got:

Could not find type “A” in the current scope.

You might apparently need a [GlobalClass] attribute before your class declaration in the C# script.