Skip to content

Experiment: Create .d.ts files from JSDOc #173

@mroderick

Description

@mroderick

In order to better support the TypeScript community and have excellent API documentation, we would like to have great JSDoc comments for this library.

From the JSDoc comments we can extract .d.ts files, which will improve the experience of TypeScript users.

See sinonjs/fake-timers#345


However, we are using a construction that is yet unsupported by TypeScript: microsoft/TypeScript#33207

Basically, tsc doesn't understand this construction and doesn't support JSDoc's @interface annotation

/** @interface */
  function Encoder() {}
  Encoder.prototype = {
    handler: function(stream, code_point) {}
  };

A solution could be spread across several pull requests:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions