Name<T,U,>(name: string,named: T,props?: U,):
Set the name of something. Optionally, assign metadata.
-
By default, the
nameproperty of functions is read-only, so this is accomplished using [Object.defineProperty]. -
Metadata added by this function is coped by descriptor, which means getters and setters will work as defined.