eleith / emailjs

html emails and attachments to any smtp server with nodejs
MIT License
2.18k stars 230 forks source link

27 errors when building with @tsconfig/node18-strictest #322

Open ms270169 opened 1 year ago

ms270169 commented 1 year ago

When using emailjs in a project with typescript settings based on @tsconfig/node18-strictest-esm, a build creates 27 errors on this modules.

zackschuster commented 1 year ago

part of this is adding support for the new exactOptionalPropertyTypes option, and part of this is your config just being stricter than ours 😂. really it just looks like it wants us to add a bunch of defensive checks. i'm looking into addressing this now.

for reference, here is our compiler options:

{
    "lib": [
        "es2017"
    ],
    "target": "es2017",
    "module": "esnext",
    "moduleResolution": "node",
    "downlevelIteration": true,
    "esModuleInterop": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "removeComments": true,
    "resolveJsonModule": true,
    "sourceMap": true,
    "strict": true
}

@eleith heads up as addressing this may have a minor perf effect

arnonrdp commented 1 year ago

Has same problem. Solved changing from vue-cli to Vite.

(ps.: only did this because I am working in a very small repo)