levp / wrapper-webpack-plugin

A webpack plugin that wraps output files (chunks) with custom text or code.
91 stars 37 forks source link

Added type description for module #20

Closed shulandmimi closed 1 year ago

shulandmimi commented 2 years ago

Added a typescript type description file in the root directory, which describes the types in wrapper-webpack-plugin.js.

image

shulandmimi commented 1 year ago

@levp please take a look

levp commented 1 year ago

The {import('./type.d').Options} syntax looks suspect to me.

According to typescriptlang.org:

"This syntax is TypeScript-specific and differs from the JSDoc standard"

As per my understanding the use case for this is to generate type definitions from JavaScript that has JSDoc comments, but since this pull request adds dedicated type definitions, the import syntax doesn't seem useful.

shulandmimi commented 1 year ago

You are right, I will revert this part of the code