You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fields of children in @field properties table<string, PropsClass>? when non-nil should have a tooltip with their associated field typings and comments.
Actual Behaviour
The fields of children in @field properties table<string, PropsClass>? when non-nil do not have a tooltip with their associated field typings and comments. Instead displaying as ambiguous and no highlighting to indicate a warning or error:
I am unable to replicate. Can you provide your full code snippet and annotations?
My best guess is your did variable is not a string and thus does not satisfy table<string, BazaarDenominationsData>, resulting in denominations being nil, as defined in your annotation:
It looks like you have the same scenario I got in your second screenshot, where it returns unknown as the "type".
The function looks like this if you want to try and replicate it more accurately:
Spoiler warning
localinterop=
{
currencies= {}
}
--- @classBazaarCurrencyData--- @fieldsymbolPatternstring The string pattern used to represent the currency using `%d`. For example: "%d gp", "gold worth %d".--- @fieldpropertiesBazaarCurrencyProperties?--- @classBazaarCurrencyProperties--- @fielddenominationstable<string, BazaarDenominationData>? Alternate object IDs for denominations of the currency. Note: If the value is less than the base, it will only be converted to the base upon reaching a whole value.--- @fieldpluralNamestring? The plural form of the currency's name.--- @fieldsoundIdstring? The sound effect played when the currency is exchanged.--- @fieldtradeOnlyboolean? Hide the currency in the merchant's barter menu.localfunctionfilterBarterMenuCallback(e)
localmerchantData=interop.getMerchant(tes3ui.getServiceActor().reference.baseObject.id)
if (merchantData) thenfor_, cidinipairs(merchantData.acceptedCurrencyIds) doprint("id 1: " ..cid)
if (e.item.id==cidande.tile.isBartered==false) thene.filter=notinterop.getCurrency(cid).properties.tradeOnlyreturnelsefordid, _inipairs(interop.getCurrency(cid).properties.denominations) doif (e.item.id==didande.tile.isBartered==false) thene.filter=notinterop.getCurrency(cid).properties.denominations[did].properties.tradeOnlyreturnendendendendelseforfunc, merchantDatainpairs(interop.complexMerchants) doif (func(tes3ui.getServiceActor().reference)) thenfor_, cidinipairs(merchantData.acceptedCurrencyIds) doprint("id 2: " ..cid)
if (e.item.id==cidande.tile.isBartered==false) thene.filter=notinterop.getCurrency(cid).properties.tradeOnlyreturnelsefordid, _inipairs(interop.getCurrency(cid).properties.denominations) doif (e.item.id==didande.tile.isBartered==false) thene.filter=notinterop.getCurrency(cid).properties.denominations[did].properties.tradeOnlyreturnendendendendbreakendendendend
This is exactly what @carsakiller trying to illustrate:
My best guess is your did variable is not a string and thus does not satisfy table<string, BazaarDenominationsData>, resulting in denominations being nil, as defined in your annotation:
your did var is integer type, as it is declared as the 1st iter var in ipairs
fordid, _inipairs(interop.getCurrency(cid).properties.denominations) do-- ^^^^ `did` is `integer` hereif (e.item.id==didande.tile.isBartered==false) thene.filter=notinterop.getCurrency(cid).properties.denominations[did].properties.tradeOnlyreturnendend
this doesn't match your @field denominations table<string, BazaarDenominationData>? which requires a string key
denominations[<string>] => BazaarDenominationData
but denominations[<integer>] => unknown
Maybe you want to write the annotation as @field denominations table<integer, BazaarDenominationData>?
or even @field denominations BazaarDenominationData[]? because it is actually an array of BazaarDenominationData ? 🤔
Furthermore if it is an array, you can access the array element directly as a loop variable:
Activity
carsakiller commentedon Feb 23, 2026
I am unable to replicate. Can you provide your full code snippet and annotations?
My best guess is your
didvariable is not a string and thus does not satisfytable<string, BazaarDenominationsData>, resulting indenominationsbeingnil, as defined in your annotation:My Code
Safebox36 commentedon Feb 23, 2026
It looks like you have the same scenario I got in your second screenshot, where it returns
unknownas the "type".The function looks like this if you want to try and replicate it more accurately:
Spoiler warning
tomlau10 commentedon Feb 24, 2026
This is exactly what @carsakiller trying to illustrate:
didvar isintegertype, as it is declared as the 1st iter var inipairs@field denominations table<string, BazaarDenominationData>?which requires astringkeydenominations[<string>]=>BazaarDenominationDatabut
denominations[<integer>]=>unknownMaybe you want to write the annotation as
@field denominations table<integer, BazaarDenominationData>?or even
@field denominations BazaarDenominationData[]?because it is actually anarray of BazaarDenominationData? 🤔Furthermore if it is an array, you can access the array element directly as a loop variable:
Safebox36 commentedon Feb 26, 2026
Oh I see what I've done now. My mistake.
carsakiller commentedon Feb 26, 2026
Good luck with your project!