Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript analyzer cares what the cwd is #148

Closed
erikrose opened this issue Jul 14, 2020 · 1 comment
Closed

TypeScript analyzer cares what the cwd is #148

erikrose opened this issue Jul 14, 2020 · 1 comment
Labels
typescript Having to do with sphinx-js's typescript support

Comments

@erikrose
Copy link
Contributor

A good way to reproduce this is to remove the cd() I re-added in f6a5f19 and run the tests. Every one of the test_build_ts tests will fail.

The computation of path in the analyzer's make_meta() doesn't make any sense to me. Especially since typedoc could be passed multiple unrelated directories in a single invocation (if js_source_path was a list), we should be computing the root_for_relative_js_paths-relative paths of things based on the originalName properties of the typedoc --json output, which are absolute paths.

More broadly, the entirety of the TypeScript analyzer needs to be re-examined and re-expressed in terms of an IR (#120). It also needs to have its tests replaced. They currently compare the whole output of the analyzer on 10 different TS files. The resulting redundant assertions magnify brittleness upon any code change and obscure which parts of the comparison are important.

See #77, #103, #109, and #143 for bugs that will be easier to fix once this is done.

@erikrose erikrose added the typescript Having to do with sphinx-js's typescript support label Jul 14, 2020
@erikrose
Copy link
Contributor Author

erikrose commented Sep 2, 2020

Fixed somewhere on the #120 branch.

@erikrose erikrose closed this as completed Sep 2, 2020
hoodmane added a commit to hoodmane/sphinx-js that referenced this issue May 6, 2024
…faces (mozilla#148)

When rendering a jsfunction, jsclass, or jsinterface, if there are type params
include them. Like:
```js
function f<S, T>(x, y)
```
I also removed the parens from classes and interfaces because they look weird.

We had to add an extra docutils node for js-type-params because the normal type
params docutils node uses square brackets not angle brackets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Having to do with sphinx-js's typescript support
Projects
None yet
Development

No branches or pull requests

1 participant