Skip to content

Commit b6c8ce8

Browse files
committed
fix: correct package-url.d.ts readonly type casing
1 parent 96822af commit b6c8ce8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/package-url.d.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ declare module "packageurl-js" {
3636

3737
export type PurlTypeValidator = (purl: PackageURL, throws: boolean) => boolean
3838

39-
export type PurlComponentEntry = ReadOnly<{
39+
export type PurlComponentEntry = Readonly<{
4040
encode: PurlComponentEncoder
4141
normalize: PurlComponentStringNormalizer
4242
validate: PurlComponentValidator
4343
}>
4444

45-
export type PurlTypeEntry = ReadOnly<{
45+
export type PurlTypeEntry = Readonly<{
4646
normalize: PurlTypNormalizer
4747
validate: PurlTypeValidator
4848
}>
@@ -51,7 +51,7 @@ declare module "packageurl-js" {
5151
* Collection of PURL component encode, normalize, and validate methods.
5252
* @see {@link https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#rules-for-each-purl-component specification}
5353
*/
54-
export type PurlComponent = ReadOnly<{
54+
export type PurlComponent = Readonly<{
5555
type: PurlComponentEntry
5656
namespace: PurlComponentEntry
5757
name: PurlComponentEntry
@@ -66,7 +66,7 @@ declare module "packageurl-js" {
6666
* Known qualifiers names.
6767
* @see {@link https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#known-qualifiers-keyvalue-pairs specification}
6868
*/
69-
export type PurlQualifierNames = ReadOnly<{
69+
export type PurlQualifierNames = Readonly<{
7070
RepositoryUrl:'repository_url',
7171
DownloadUrl: 'download_url',
7272
VcsUrl: 'vcs_url',
@@ -78,7 +78,7 @@ declare module "packageurl-js" {
7878
* Collection of PURL type normalize and validate methods.
7979
* @see {@link https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#known-purl-types specification}
8080
*/
81-
export type PurlType = ReadOnly<{
81+
export type PurlType = Readonly<{
8282
alpm: PurlTypeEntry
8383
apk: PurlTypeEntry
8484
bitbucket: PurlTypeEntry
@@ -184,9 +184,10 @@ declare module "packageurl-js" {
184184
]
185185
}
186186

187+
// @ts-ignore
187188
export const PurlComponent = <PurlComponent>{}
188-
189+
// @ts-ignore
189190
export const PurlQualifierNames = <PurlQualifierNames>{}
190-
191+
// @ts-ignore
191192
export const PurlType = <PurlType>{}
192193
}

0 commit comments

Comments
 (0)