Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

feat: parse top level functions #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

didinele
Copy link
Member

@didinele didinele commented Jun 6, 2022

This works about as expected, e.g. have this function from @discordjs/proxy:

        {
            "name": "proxyRequests",
            "meta": {
                "line": 15,
                "file": "proxyRequests.ts",
                "path": "handlers"
            },
            "params": [
                {
                    "name": "rest",
                    "description": "REST instance to use for the requests",
                    "optional": false,
                    "type": [
                        [
                            [
                                "REST"
                            ]
                        ]
                    ]
                }
            ],
            "returns": [
                [
                    [
                        "RequestHandler"
                    ]
                ]
            ]
        }

All though, the functions from builders behave a bit weirdly because they return templated string types. I'm unsure how to deal with those since the typedoc output is just outright unusual, but seems out of scope for this PR given most of my logic was based on the method parsing in util/class.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant