Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Classes #13

Open
Vurv78 opened this issue Feb 7, 2022 · 0 comments
Open

[feature] Classes #13

Vurv78 opened this issue Feb 7, 2022 · 0 comments
Labels
A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Low T-Feature Feature request X-Typescript Parity with Typescript

Comments

@Vurv78
Copy link
Owner

Vurv78 commented Feb 7, 2022

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;
}
@Vurv78 Vurv78 added T-Feature Feature request X-Typescript Parity with Typescript A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Medium Priority: Medium P-Low and removed P-Medium Priority: Medium labels Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Compiler Dealing with the compiler (analyzer, tokenizer, parser, transpiler) P-Low T-Feature Feature request X-Typescript Parity with Typescript
Projects
None yet
Development

No branches or pull requests

1 participant