FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Fix SharedTree identifier field output typing

Open noencke opened this issue 1 year ago • 0 comments

Currently, reading an identifier field of a SharedTree node produces the type unknown. This PR changes it to return string.

Note that the input type (the type provided when supplying an identifier) is still string | undefined. This is accomplished by special casing identifiers in the ApplyKind type helper. This is the first instance in which we have data whose input type is optional but whose output type is not.

This PR should go in after identifiers have been giving defaulting behavior, so that the input type can indeed be optional while still guaranteeing a valid output type later.

noencke avatar May 02 '24 22:05 noencke