eleith / emailjs

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

Typescript issue #301

Closed abdulrahman1s closed 3 years ago

abdulrahman1s commented 3 years ago

In complies this appears to me

node_modules/emailjs/smtp/date.ts:43:188 - error TS2554: Expected 1-2 arguments, but got 0.

43  /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/.compile();
                                                                                                                                                                                              ~~~~~~~~~
../../.fnm/node-versions/v16.13.0/installation/lib/node_modules/typescript/lib/lib.es5.d.ts:968:13
    968     compile(pattern: string, flags?: string): this;
                    ~~~~~~~~~~~~~~~
    An argument for 'pattern' was not provided.

TSConfig:

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "CommonJS",
    "moduleResolution": "Node",
    "strict": true,
    "alwaysStrict": true,
    "pretty": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "skipLibCheck": true,
    "outDir": "dist",
    "forceConsistentCasingInFileNames": true
  },
  "include": [
    "src/**/*.ts"
  ]
}
zackschuster commented 3 years ago

looks like we shouldn't have used RegExp.prototype.compile to begin with.

@eleith i've pushed a fix dropping the call & readied main for a patch release. would you mind publishing it?

eleith commented 3 years ago

released 3.7.0