Skip to content

Commit b3f74be

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 3673f99 commit b3f74be

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/enums/SpdxId.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// this type is currently a draft. it will most likely change or be removed.
2+
export enum SpdxId {
3+
// @TODO read all the values from `../../res/spdx.SNAPSHOT.schema.json`
4+
}

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)