opencascade.js icon indicating copy to clipboard operation
opencascade.js copied to clipboard

Add OpenCascade's comments into typescript defintions

Open donalffons opened this issue 4 years ago • 1 comments

Those comments will then be visible via "Intellisense" in most editors / IDEs.

donalffons avatar Jul 03 '21 20:07 donalffons

The class TypescriptBindings has all the methods to generate typescript definitions. It "returns" the bindings using the string self.output. A good place to start might be the method processClass, which is supposed to output the export declare class [...] line, above which we want to add a typescript comment. The comment should be accessible using theClass.brief_comment.

image

The bindings are generated by the script /opencascade.js/src/generateBindings.py which produces intermediate .d.ts.json files. And the command /opencascade.js/src/buildFromYaml.py /opencascade.js/src/builds/opencascade.full.yml will create a full build (including typescript definitions) in the current directory.

donalffons avatar Jul 07 '21 09:07 donalffons