Open brianmhunt opened 5 years ago
Just a cosmetic typing note:
at https://github.com/fidm/x509/blob/master/src/x509.ts#L296 the data argument is converted via toString in https://github.com/fidm/asn1/blob/master/src/pem.ts#L44, so it seems like it could safely receive a string, and a more general parameter type could be Buffer | string i.e.
data
toString
string
Buffer | string
static fromPEM (data: Buffer | string): Certificate { return Certificate.fromPEMs(data)[0] }
Just a cosmetic typing note:
at https://github.com/fidm/x509/blob/master/src/x509.ts#L296 the
data
argument is converted viatoString
in https://github.com/fidm/asn1/blob/master/src/pem.ts#L44, so it seems like it could safely receive astring
, and a more general parameter type could beBuffer | string
i.e.