Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

[feature] Classes #13

@vurvdev

Description

@vurvdev

Is your feature request related to a problem? Please describe.
There's no way to interface with external gmod types / userdata, like Vector and Angle.

Describe the solution you'd like
Classes to be made, alongside complex types / #12

class Foo {
	public bar: double;
	constructor(a: double, b: double) {
		this.bar = a + b;
	}
}

let afoo = new Foo(5.0, 10.0);
print( afoo.bar );

Additional context
This would need to be accompanied, or soon accompanied by an extern version.

declare class Vector {
	public x: double;
	public y: double;
	public z: double;

	public Div(divisor: Vector): void;
	public Angle(): Angle;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CompilerDealing with the compiler (analyzer, tokenizer, parser, transpiler)P-LowT-FeatureFeature requestX-TypescriptParity with Typescript

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions