Skip to content

Commit 392fe59

Browse files
committed
wip
1 parent 3673f99 commit 392fe59

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/enums/SpdxId.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export enum SpdxId {
2+
// @TODO read all the values from `../../res/spdx.SNAPSHOT.schema.json`
3+
}

src/models/License.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {SpdxId} from '../enums/SpdxId'
2+
13
export class LicenseExpression {
24
value: string
35

@@ -17,11 +19,11 @@ export class NamedLicense {
1719
}
1820

1921
export class SpdxLicense {
20-
id: string // @TODO: have dynamic SPDX enum basec on json schema file -- use json import feature of nodejs?
22+
id: SpdxId
2123
text: string | null = null
2224
url: URL | null = null
2325

24-
constructor(id: string) {
26+
constructor(id: SpdxId) {
2527
this.id = id
2628
}
2729
}

0 commit comments

Comments
 (0)