types
types copied to clipboard
Explicit `ContentId` type
From https://github.com/roblox-ts/types/pull/1184#pullrequestreview-1906505733, should we introduce an explicit ContentId type?
I'm not sure if a string template type is the best option here since the content ID can take a lot of different forms. However, a simple type ContentId = string would make the API more explicit.
For easy changes as Dionysusnu said, it might be better to add ContentId to the Content data type.
I would say that writing with type ContentId = string is very specific.
This might be closed by #1318?
I'd say leave it open for discussing whether the type can be refined from string.
From my preliminary testing however, the strings aren't bounded, so for example they could also just be "abc".