Skip to content

Conversation

@kurkle
Copy link
Member

@kurkle kurkle commented Feb 7, 2020

On top of #7030, add type generation.

It produced initially 3 errors, that are resolved by changing defaults and pluginService to class declarations, making singleton instance and exporting that, changing defaults._set to defaults.set and exporting DateAdapter.

Also fixed the formatting of gulpfile.js

@kurkle
Copy link
Member Author

kurkle commented Feb 7, 2020

Oops. rebasing caused some new errors.

Copy link
Contributor

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes you made to PluginService, etc. will probably make the typedoc generated for those classes better. There were a couple it was skipping and I imagine this will fix it

I had tried generating types, but I wasn't sure they were that useful. It was just marking everything as type any in my attempt, so I figured the DefinitelyTyped ones would be more useful. That might be able to be fixed by either adding more JSDocs specifying the types or by actually converting the code to be written in TypeScript

gulpfile.js Outdated

var pkg = require('./package.json');
var tsProject = typescript.createProject('./tsconfig.json');
var tsBuild = typescript.createProject('./tsconfig.build.json');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a new one? Or will it work to just put the new options in the existing tsconfig.json?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would work.
This way we have linting and building separated, but not sure how useful it is.

@kurkle kurkle force-pushed the generate-types branch 3 times, most recently from 00c15b8 to 4f74824 Compare February 8, 2020 07:04
@benmccann
Copy link
Contributor

I'm not sure about actually generating the types because I'm not sure the auto-generated ones are as useful as the handmade ones at DefinitelyTyped, but I like the other changes. Maybe we could split this into two PRs to consider separately?

@kurkle kurkle closed this Feb 11, 2020
@kurkle kurkle deleted the generate-types branch February 19, 2020 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants