Open
Description
Feature suggestion
Support private properties: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties
Example:
class Class {
#example: i32;
}
Support private properties: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties
Example:
class Class {
#example: i32;
}
Activity
mattjohnsonpint commentedon Mar 25, 2025
Is this just a request to support the
#
syntax instead ofprivate
? Or would you expect a difference in functionality?Considering the feature overview from the TypeScript 3.8 release notes (when it was added), in TypeScript
private
is "soft privacy" where#
is "hard privacy". But in AssemblyScript, since there's no JS transpile, then I believeprivate
is already "hard privacy".