Open valarnin opened 1 month ago
Ref: More info on issue in prior repo: https://github.com/quisquous/cactbot/issues/5538
I think it CAN be done by reading the ImportDeclaration
statement, then programmatically invoking TypeScript
's parser to get the AST of that file, and then following the properties to get all its keys. But this is really painful to do such a thing.
I am digging typescript declarations files, hoping this checking can be done by typescript itself rather than eslint.
Even with the latest build of typescript, we can't force inference for this automatically, unfortunately.
It may make more sense to extract the ID of the trigger, then just import
the triggerset directly and pull the computed outputStrings
value from that, if we're dealing with it as a property (as opposed to cactbot-builtin-response
setting it within the trigger).
See commit https://github.com/OverlayPlugin/cactbot/pull/261/commits/f7606142f5de509e37e9f71e6fad539269051ca0, which added an explicit
unknown
key to the const-defined output strings map, despite the key existing on theDirections.outputStringsCardinalDir
constant.