chore: Separate result options & Improve TSConfig #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
chore: separate result type and make options as optional
separate result type and make
options
as optional by adding default options an empty object. Prevent assign to undefined variable.fix: types node
install
@types/node
instead overridetype: node
. this method will fixed typescript build for both single project or workspaces/monorepo project.68b5eef
2f1c469
refactor: enable
esModuleInterop
the ES6 modules spec states that a namespace import (
import * as x
) can only be an object, by having TypeScript treating it the same as= require("x")
then TypeScript allowed for the import to be treated as a function and be callable. That's not valid according to the spec.while accurate to the ES6 modules spec, most libraries with CommonJS/AMD/UMD modules didn't conform as strictly as TypeScript's implementation.
Turning on
esModuleInterop
will fix both of these problems in the code transpiled by TypeScript. see more2f1c469
#diff-b55cdbef4907b7045f32cc5360d48d262cca5f94062e353089f189f4460039e0fix: failed build caused by libs in node_modules on both
single
ormonorepo
projectmodify
tsconfig.json
to skip typechecking onnode_modules
.sample useless errors while compiling (
npm run build
)actually this package doesnt include
warehouse
, but look the above errors.https://github.com/dimaslanjaka/hexo-front-matter/blob/64c2a6940366909c262e914e967c95233cbd9570/lib/front_matter.ts#L1-L4
above error occurs while used the repo inside
workspace
/monorepo
tree project, not single project.this will fixed develop on both monorepo or single project.
fix: TS2345
Argument of type 'string' is not assignable to parameter of type 'never'
chore(deps-dev): update
@types/node
v18 to latest build