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
If you convert the jsconfig.json file to a tsconfig.json file, set strict: true, and then open the assets.d.ts file (in VSCode, at least), you are presented with the following errors:
A 'declare' modifier cannot be used in an already ambient context. ts(1038) [119, 5]
A 'declare' modifier cannot be used in an already ambient context. ts(1038) [155, 5]
These refer to the fact that the colors and characterStyles classes are declared inside an already declared module.
Removing those declare statements results in further errors related to the definition of the static class. As both the colors and characterStyles "classes" are actually interfaces that allow you to access information (you never have an "instance" of those "classes"), they should simply be converted to interfaces and the static keyword removed from all function definitions. Then a constant should be added that implements that interface so that it is accessible as a name and not just a type. Taken together, the two "class"es should look something like this:
If you convert the
jsconfig.json
file to atsconfig.json
file, setstrict: true
, and then open theassets.d.ts
file (in VSCode, at least), you are presented with the following errors:ts(1038) [119, 5]
ts(1038) [155, 5]
These refer to the fact that the
colors
andcharacterStyles
classes are declared inside an already declared module.Removing those
declare
statements results in further errors related to the definition of thestatic class
. As both thecolors
andcharacterStyles
"classes" are actually interfaces that allow you to access information (you never have an "instance" of those "classes"), they should simply be converted tointerface
s and thestatic
keyword removed from all function definitions. Then a constant should be added that implements that interface so that it is accessible as a name and not just a type. Taken together, the two "class"es should look something like this:The text was updated successfully, but these errors were encountered: