Test:
class Test:
def __init__(self):
self.value1 = null
def method(self):
self.value1 = 0
$ npx rapydscript -p -6 typescriptKlass.pyj > typescriptKlass.ts
$ tsc --lib es7 typescriptKlass.ts
typescriptKlass.ts:26:18 - error TS2339: Property 'value1' does not exist on type 'Test'.
26 self.value1 = null;
~~~~~~
typescriptKlass.ts:30:18 - error TS2339: Property 'value1' does not exist on type 'Test'.
30 self.value1 = 0;
~~~~~~
Found 2 errors.
It seems that the attributes need to be decleared at the scope of class first for typescript.
BTW: It would be great to transcompile to type annotated typescript code.