We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3673f99 commit b3f74beCopy full SHA for b3f74be
src/enums/SpdxId.ts
@@ -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
@@ -1,3 +1,5 @@
+import {SpdxId} from '../enums/SpdxId'
+
export class LicenseExpression {
value: string
5
@@ -17,11 +19,11 @@ export class NamedLicense {
17
19
}
18
20
21
export class SpdxLicense {
- id: string // @TODO: have dynamic SPDX enum basec on json schema file -- use json import feature of nodejs?
22
+ id: SpdxId
23
text: string | null = null
24
url: URL | null = null
25
- constructor(id: string) {
26
+ constructor(id: SpdxId) {
27
this.id = id
28
29
0 commit comments