Skip to content

How to map obj[Symbol.dispose] to obj.Dispose() #533

Description

@DavidBal

Hi ClearScript Team,

in the recent update of TypeScript the using statement was added.
https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management

The JavaScript for this feature looks something like this:

const obj = new DispoableObject();

try{

}
finally
{
 obj[Symbol.dispose]();
}

Is there any way we can map this call to CSharp?

Thanks in advance.

Best regards,
David

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions