jfromaniello / selfsigned

Generate self-signed certificates from node.js
MIT License
237 stars 53 forks source link

TS2769: No overload matches this call. #65

Open HaTiIn opened 1 year ago

HaTiIn commented 1 year ago

Hi,

there seems to be an issue with type definition:

Overload 1 of 2, '(attrs?: CertificateField[], opts?: SelfsignedOptions): GenerateResult', gave the following error.
    Type 'true' is not assignable to type 'undefined'.
  Overload 2 of 2, '(attrs?: CertificateField[], opts?: SelfsignedOptions, done?: (err: Error, result: GenerateResult) => any): void', gave the following error.
    Type 'true' is not assignable to type 'undefined'.

I would expect index.d.ts line 32: clientCertificate?: undefined to be clientCertificate?: boolean Furthermore the SelfsignedOptions interface seems to miss the keyPair attribute.

Best regards, Hans

OliverHenrichs commented 2 months ago

Bump; KeyPair is still not an attribute of interface SelfsignedOptions in the index.d.ts even though it's advertised to be used (and is used in the Javascript-Code). image