type function createPrinterDataRowEntry(isSelfClosingMarkup : type)
assert(markups, "type alias markups not found")
local type_ = {
[types.singleton("row")] = frameType,
[types.singleton("markups")] = markups,
[types.singleton("index")] = types.number,
[types.singleton("whitespace")] = types.optional(types.boolean),
[types.singleton("containers")] = types.newtable(
nil,
{
index = types.number,
readresult = guiObjectType,
writeresult = guiObjectType,
}
),
[types.singleton("position")] = vector2Type,
[types.singleton("rotation")] = types.number,
}
if isSelfClosingMarkup == types.unknown then
type_[types.singleton("character")] = types.unionof(textLabelType, imageLabelType)
type_[types.singleton("constructionDataRowEntry")] = constructionDataRowEntry()
elseif not isSelfClosingMarkup:value() then
type_[types.singleton("character")] = textLabelType
type_[types.singleton("constructionDataRowEntry")] = constructionDataRowEntry(types.singleton(false))
else
type_[types.singleton("character")] = imageLabelType
type_[types.singleton("constructionDataRowEntry")] = constructionDataRowEntry(types.singleton(true))
end
return types.newtable(type_)
end
export type printerDataRowEntry<T = unknown> = createPrinterDataRowEntry<T>
export type markups = {
wait : {
value : number,
attributes : {},
valueAttributes : {},
},
...
this is a small snippet of code in which the type solver does not recognize type aliases inside the createPrinterDataRowEntry type function, assert(markups, "type alias markups not found") here throws
place file which contains a reproduction:
bug_reproduction.rbxl (67.6 KB)
the issue occurs inside ReplicatedStorage/Types
Expected behavior
Markups, and other type aliases should be accessible from within createPrinterDataRowEntry