@sjcrh/proteinpaint-types 2.86.0 → 2.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/README.md +22 -0
  2. package/dist/brainImaging.js +11 -0
  3. package/dist/brainImagingSamples.js +11 -0
  4. package/dist/burden.js +11 -0
  5. package/dist/chunk-37ZPCVP5.js +111 -0
  6. package/dist/chunk-5GG2FNAY.js +62 -0
  7. package/dist/chunk-5JWTIWVB.js +222 -0
  8. package/dist/chunk-5RZYB4M4.js +171 -0
  9. package/dist/chunk-6EFB6ZMB.js +62 -0
  10. package/dist/chunk-6LFMFM2C.js +122 -0
  11. package/dist/chunk-7PMGKVWQ.js +62 -0
  12. package/dist/chunk-7Z3IHB43.js +152 -0
  13. package/dist/chunk-B3D26X6X.js +337 -0
  14. package/dist/chunk-BY2JABTF.js +256 -0
  15. package/dist/chunk-CETMA2FU.js +144 -0
  16. package/dist/chunk-DCN75URO.js +1740 -0
  17. package/dist/chunk-DIDZMC3G.js +96 -0
  18. package/dist/chunk-DKSPASWZ.js +4058 -0
  19. package/dist/chunk-EWRK4PKZ.js +62 -0
  20. package/dist/chunk-FDTUTGQG.js +288 -0
  21. package/dist/chunk-FZ6QOTGM.js +205 -0
  22. package/dist/chunk-GU7LIGHN.js +174 -0
  23. package/dist/chunk-IL33L6MY.js +126 -0
  24. package/dist/chunk-INDBFC54.js +1538 -0
  25. package/dist/chunk-IT7IGDC4.js +1697 -0
  26. package/dist/chunk-IWG5IPXG.js +3409 -0
  27. package/dist/chunk-JEQ3TBVQ.js +1472 -0
  28. package/dist/chunk-JPW6LFDQ.js +1507 -0
  29. package/dist/chunk-K2KQTFQI.js +113 -0
  30. package/dist/chunk-M33KP65Z.js +3347 -0
  31. package/dist/chunk-MUJUKENL.js +62 -0
  32. package/dist/chunk-N45Z3JCY.js +62 -0
  33. package/dist/chunk-OMHEDUNA.js +62 -0
  34. package/dist/chunk-OY3EKV7F.js +130 -0
  35. package/dist/chunk-Q56YNQFK.js +3417 -0
  36. package/dist/chunk-QDIIM52V.js +165 -0
  37. package/dist/chunk-QX7QLUKY.js +228 -0
  38. package/dist/chunk-RLFGMVJZ.js +234 -0
  39. package/dist/chunk-SDOWCOGK.js +96 -0
  40. package/dist/chunk-UCG25D2C.js +109 -0
  41. package/dist/chunk-UIU3IQH4.js +62 -0
  42. package/dist/chunk-W3F2RMPU.js +3494 -0
  43. package/dist/chunk-W3QYIXXF.js +273 -0
  44. package/dist/chunk-XGAOGA3F.js +159 -0
  45. package/dist/chunk-XJCQEOPB.js +61 -0
  46. package/dist/chunk-XLBSZOMF.js +117 -0
  47. package/dist/chunk-XQQ5G6N6.js +109 -0
  48. package/dist/chunk-Z6B6IQIY.js +1785 -0
  49. package/dist/dataset.js +11 -0
  50. package/dist/dsdata.js +11 -0
  51. package/dist/dzimages.js +11 -0
  52. package/dist/gdc.maf.js +11 -0
  53. package/dist/gdc.mafBuild.js +11 -0
  54. package/dist/gdc.topMutatedGenes.js +11 -0
  55. package/dist/genelookup.js +11 -0
  56. package/dist/genesetEnrichment.js +11 -0
  57. package/dist/genesetOverrepresentation.js +11 -0
  58. package/dist/healthcheck.js +11 -0
  59. package/dist/hicdata.js +11 -0
  60. package/dist/hicgenome.js +11 -0
  61. package/dist/hicstat.js +11 -0
  62. package/dist/index.js +347 -0
  63. package/dist/isoformlst.js +11 -0
  64. package/dist/ntseq.js +11 -0
  65. package/dist/pdomain.js +11 -0
  66. package/dist/samplewsimages.js +11 -0
  67. package/dist/snp.js +11 -0
  68. package/dist/termdb.DE.js +11 -0
  69. package/dist/termdb.boxplot.js +11 -0
  70. package/dist/termdb.categories.js +11 -0
  71. package/dist/termdb.cluster.js +11 -0
  72. package/dist/termdb.cohort.summary.js +11 -0
  73. package/dist/termdb.cohorts.js +11 -0
  74. package/dist/termdb.descrstats.js +11 -0
  75. package/dist/termdb.numericcategories.js +11 -0
  76. package/dist/termdb.percentile.js +11 -0
  77. package/dist/termdb.rootterm.js +11 -0
  78. package/dist/termdb.sampleImages.js +11 -0
  79. package/dist/termdb.singleSampleMutation.js +11 -0
  80. package/dist/termdb.singlecellDEgenes.js +11 -0
  81. package/dist/termdb.singlecellData.js +11 -0
  82. package/dist/termdb.singlecellSamples.js +11 -0
  83. package/dist/termdb.termchildren.js +11 -0
  84. package/dist/termdb.termsbyids.js +11 -0
  85. package/dist/termdb.topTermsByType.js +11 -0
  86. package/dist/termdb.topVariablyExpressedGenes.js +11 -0
  87. package/dist/termdb.violin.js +11 -0
  88. package/dist/tileserver.js +11 -0
  89. package/dist/wsimages.js +11 -0
  90. package/package.json +17 -15
  91. package/src/Mclass.ts +8 -0
  92. package/src/dataset.ts +1578 -0
  93. package/src/docs.json +16417 -0
  94. package/src/fileOrUrl.ts +15 -0
  95. package/src/filter.ts +125 -0
  96. package/src/genome.ts +123 -0
  97. package/src/index.ts +67 -0
  98. package/src/routes/brainImaging.ts +47 -0
  99. package/src/routes/brainImagingSamples.ts +25 -0
  100. package/src/routes/burden.ts +111 -0
  101. package/src/routes/dataset.ts +14 -0
  102. package/src/routes/dsdata.ts +14 -0
  103. package/src/routes/dzimages.ts +25 -0
  104. package/src/routes/errorResponse.ts +6 -0
  105. package/src/routes/filter.gdc.ts +15 -0
  106. package/src/routes/gdc.maf.ts +52 -0
  107. package/src/routes/gdc.mafBuild.ts +20 -0
  108. package/src/routes/gdc.topMutatedGenes.ts +37 -0
  109. package/src/routes/genelookup.ts +22 -0
  110. package/src/routes/genesetEnrichment.ts +60 -0
  111. package/src/routes/genesetOverrepresentation.ts +48 -0
  112. package/src/routes/healthcheck.ts +79 -0
  113. package/src/routes/hicdata.ts +48 -0
  114. package/src/routes/hicgenome.ts +50 -0
  115. package/src/routes/hicstat.ts +57 -0
  116. package/src/routes/isoformlst.ts +14 -0
  117. package/src/routes/ntseq.ts +14 -0
  118. package/src/routes/pdomain.ts +14 -0
  119. package/src/routes/routeApi.ts +41 -0
  120. package/src/routes/samplewsimages.ts +27 -0
  121. package/src/routes/snp.ts +13 -0
  122. package/src/routes/termdb.DE.ts +57 -0
  123. package/src/routes/termdb.boxplot.ts +78 -0
  124. package/src/routes/termdb.categories.ts +73 -0
  125. package/src/routes/termdb.cluster.ts +103 -0
  126. package/src/routes/termdb.cohort.summary.ts +14 -0
  127. package/src/routes/termdb.cohorts.ts +14 -0
  128. package/src/routes/termdb.descrstats.ts +78 -0
  129. package/src/routes/termdb.numericcategories.ts +32 -0
  130. package/src/routes/termdb.percentile.ts +65 -0
  131. package/src/routes/termdb.rootterm.ts +49 -0
  132. package/src/routes/termdb.sampleImages.ts +26 -0
  133. package/src/routes/termdb.singleSampleMutation.ts +29 -0
  134. package/src/routes/termdb.singlecellDEgenes.ts +41 -0
  135. package/src/routes/termdb.singlecellData.ts +69 -0
  136. package/src/routes/termdb.singlecellSamples.ts +46 -0
  137. package/src/routes/termdb.termchildren.ts +49 -0
  138. package/src/routes/termdb.termsbyids.ts +26 -0
  139. package/src/routes/termdb.topTermsByType.ts +32 -0
  140. package/src/routes/termdb.topVariablyExpressedGenes.ts +56 -0
  141. package/src/routes/termdb.violin.ts +122 -0
  142. package/src/routes/tileserver.ts +14 -0
  143. package/src/routes/wsimages.ts +24 -0
  144. package/src/terms/categorical.ts +106 -0
  145. package/src/terms/condition.ts +55 -0
  146. package/src/terms/geneExpression.ts +32 -0
  147. package/src/terms/geneVariant.ts +51 -0
  148. package/src/terms/metaboliteIntensity.ts +31 -0
  149. package/src/terms/numeric.ts +253 -0
  150. package/src/terms/q.ts +38 -0
  151. package/src/terms/samplelst.ts +41 -0
  152. package/src/terms/singleCellCellType.ts +22 -0
  153. package/src/terms/singleCellGeneExpression.ts +28 -0
  154. package/src/terms/snp.ts +28 -0
  155. package/src/terms/snps.ts +110 -0
  156. package/src/terms/term.ts +184 -0
  157. package/src/terms/tw.ts +38 -0
  158. package/src/terms/updated-types.ts +9 -0
  159. package/src/termsetting.ts +197 -0
  160. package/src/test/numeric.type.spec.ts +275 -0
  161. package/src/vocab.ts +37 -0
  162. package/dist/routes.ts +0 -28911
  163. package/src/Mclass.js +0 -0
  164. package/src/checkers/routes.js +0 -167
  165. package/src/dataset.js +0 -0
  166. package/src/fileOrUrl.js +0 -0
  167. package/src/filter.js +0 -0
  168. package/src/genome.js +0 -0
  169. package/src/index.js +0 -66
  170. package/src/routes/brainImaging.js +0 -11
  171. package/src/routes/brainImagingSamples.js +0 -11
  172. package/src/routes/burden.js +0 -44
  173. package/src/routes/dataset.js +0 -12
  174. package/src/routes/dsdata.js +0 -12
  175. package/src/routes/dzimages.js +0 -12
  176. package/src/routes/errorResponse.js +0 -0
  177. package/src/routes/filter.gdc.js +0 -0
  178. package/src/routes/gdc.maf.js +0 -17
  179. package/src/routes/gdc.mafBuild.js +0 -12
  180. package/src/routes/gdc.topMutatedGenes.js +0 -12
  181. package/src/routes/genelookup.js +0 -12
  182. package/src/routes/genesetEnrichment.js +0 -12
  183. package/src/routes/genesetOverrepresentation.js +0 -12
  184. package/src/routes/healthcheck.js +0 -23
  185. package/src/routes/hicdata.js +0 -12
  186. package/src/routes/hicgenome.js +0 -29
  187. package/src/routes/hicstat.js +0 -12
  188. package/src/routes/isoformlst.js +0 -12
  189. package/src/routes/ntseq.js +0 -12
  190. package/src/routes/pdomain.js +0 -12
  191. package/src/routes/routeApi.js +0 -0
  192. package/src/routes/samplewsimages.js +0 -12
  193. package/src/routes/snp.js +0 -11
  194. package/src/routes/termdb.DE.js +0 -13
  195. package/src/routes/termdb.boxplot.js +0 -12
  196. package/src/routes/termdb.categories.js +0 -48
  197. package/src/routes/termdb.cluster.js +0 -12
  198. package/src/routes/termdb.cohort.summary.js +0 -12
  199. package/src/routes/termdb.cohorts.js +0 -12
  200. package/src/routes/termdb.descrstats.js +0 -48
  201. package/src/routes/termdb.numericcategories.js +0 -12
  202. package/src/routes/termdb.percentile.js +0 -49
  203. package/src/routes/termdb.rootterm.js +0 -27
  204. package/src/routes/termdb.sampleImages.js +0 -12
  205. package/src/routes/termdb.singleSampleMutation.js +0 -12
  206. package/src/routes/termdb.singlecellDEgenes.js +0 -12
  207. package/src/routes/termdb.singlecellData.js +0 -12
  208. package/src/routes/termdb.singlecellSamples.js +0 -12
  209. package/src/routes/termdb.termchildren.js +0 -28
  210. package/src/routes/termdb.termsbyids.js +0 -12
  211. package/src/routes/termdb.topTermsByType.js +0 -12
  212. package/src/routes/termdb.topVariablyExpressedGenes.js +0 -12
  213. package/src/routes/termdb.violin.js +0 -49
  214. package/src/routes/tileserver.js +0 -12
  215. package/src/routes/wsimages.js +0 -12
  216. package/src/terms/categorical.js +0 -0
  217. package/src/terms/condition.js +0 -0
  218. package/src/terms/geneExpression.js +0 -0
  219. package/src/terms/geneVariant.js +0 -0
  220. package/src/terms/metaboliteIntensity.js +0 -0
  221. package/src/terms/numeric.js +0 -0
  222. package/src/terms/q.js +0 -0
  223. package/src/terms/samplelst.js +0 -0
  224. package/src/terms/singleCellCellType.js +0 -0
  225. package/src/terms/singleCellGeneExpression.js +0 -0
  226. package/src/terms/snp.js +0 -0
  227. package/src/terms/snps.js +0 -0
  228. package/src/terms/term.js +0 -0
  229. package/src/terms/tw.js +0 -0
  230. package/src/terms/updated-types.js +0 -0
  231. package/src/termsetting.js +0 -0
  232. package/src/test/numeric.type.spec.js +0 -117
  233. package/src/vocab.js +0 -0
@@ -1,12 +0,0 @@
1
- const termdbClusterPayload = {
2
- request: {
3
- typeId: "TermdbClusterRequest"
4
- },
5
- response: {
6
- typeId: "TermdbClusterResponse"
7
- }
8
- //examples: []
9
- };
10
- export {
11
- termdbClusterPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbCohortSummaryPayload = {
2
- request: {
3
- typeId: "TermdbCohortSummaryRequest"
4
- },
5
- response: {
6
- typeId: "TermdbCohortSummaryResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbCohortSummaryPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbCohortsPayload = {
2
- request: {
3
- typeId: "TermdbCohortsRequest"
4
- },
5
- response: {
6
- typeId: "TermdbCohortsResponse"
7
- }
8
- //examples: []
9
- };
10
- export {
11
- termdbCohortsPayload
12
- };
@@ -1,48 +0,0 @@
1
- const descrStatsPayload = {
2
- request: {
3
- typeId: "DescrStatsRequest"
4
- },
5
- response: {
6
- typeId: "DescrStatsResponse"
7
- },
8
- examples: [
9
- {
10
- request: {
11
- body: {
12
- genome: "hg38-test",
13
- dslabel: "TermdbTest",
14
- embedder: "localhost",
15
- tw: { term: { id: "hrtavg" }, q: { mode: "continuous" } },
16
- filter: {
17
- type: "tvslst",
18
- in: true,
19
- join: "",
20
- lst: [
21
- {
22
- tag: "cohortFilter",
23
- type: "tvs",
24
- tvs: {
25
- term: {
26
- name: "Cohort",
27
- type: "categorical",
28
- values: { ABC: { label: "ABC" }, XYZ: { label: "XYZ" } },
29
- id: "subcohort",
30
- isleaf: false,
31
- groupsetting: { disabled: true }
32
- },
33
- values: [{ key: "ABC", label: "ABC" }]
34
- }
35
- }
36
- ]
37
- }
38
- }
39
- },
40
- response: {
41
- header: { status: 200 }
42
- }
43
- }
44
- ]
45
- };
46
- export {
47
- descrStatsPayload
48
- };
@@ -1,12 +0,0 @@
1
- const numericCategoriesPayload = {
2
- request: {
3
- typeId: "NumericCategoriesRequest"
4
- },
5
- response: {
6
- typeId: "NumericCategoriesResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- numericCategoriesPayload
12
- };
@@ -1,49 +0,0 @@
1
- const percentilePayload = {
2
- request: {
3
- typeId: "PercentileRequest"
4
- },
5
- response: {
6
- typeId: "PercentileResponse"
7
- },
8
- examples: [
9
- {
10
- request: {
11
- body: {
12
- genome: "hg38-test",
13
- dslabel: "TermdbTest",
14
- embedder: "localhost",
15
- getpercentile: [50],
16
- tid: "agedx",
17
- filter: {
18
- type: "tvslst",
19
- in: true,
20
- join: "",
21
- lst: [
22
- {
23
- tag: "cohortFilter",
24
- type: "tvs",
25
- tvs: {
26
- term: {
27
- name: "Cohort",
28
- type: "categorical",
29
- values: { ABC: { label: "ABC" }, XYZ: { label: "XYZ" } },
30
- id: "subcohort",
31
- isleaf: false,
32
- groupsetting: { disabled: true }
33
- },
34
- values: [{ key: "ABC", label: "ABC" }]
35
- }
36
- }
37
- ]
38
- }
39
- }
40
- },
41
- response: {
42
- header: { status: 200 }
43
- }
44
- }
45
- ]
46
- };
47
- export {
48
- percentilePayload
49
- };
@@ -1,27 +0,0 @@
1
- const rootTermPayload = {
2
- request: {
3
- typeId: "RootTermRequest"
4
- },
5
- response: {
6
- typeId: "RootTermResponse"
7
- },
8
- examples: [
9
- {
10
- request: {
11
- body: {
12
- genome: "hg38-test",
13
- dslabel: "TermdbTest",
14
- embedder: "localhost",
15
- default_rootterm: 1,
16
- cohortValues: "ABC"
17
- }
18
- },
19
- response: {
20
- header: { status: 200 }
21
- }
22
- }
23
- ]
24
- };
25
- export {
26
- rootTermPayload
27
- };
@@ -1,12 +0,0 @@
1
- const termdbSampleImagesPayload = {
2
- request: {
3
- typeId: "TermdbSampleImagesRequest"
4
- },
5
- response: {
6
- typeId: "TermdbSampleImagesResponse"
7
- }
8
- //examples: []
9
- };
10
- export {
11
- termdbSampleImagesPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbSingleSampleMutationPayload = {
2
- request: {
3
- typeId: "TermdbSingleSampleMutationRequest"
4
- },
5
- response: {
6
- typeId: "TermdbSingleSampleMutationResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbSingleSampleMutationPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbSingleCellDEgenesPayload = {
2
- request: {
3
- typeId: "TermdbSingleCellDEgenesRequest"
4
- },
5
- response: {
6
- typeId: "TermdbSingleCellDEgenesResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbSingleCellDEgenesPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbSingleCellDataPayload = {
2
- request: {
3
- typeId: "TermdbSingleCellDataRequest"
4
- },
5
- response: {
6
- typeId: "TermdbSingleCellDataResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbSingleCellDataPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbSingleCellSamplesPayload = {
2
- request: {
3
- typeId: "TermdbSingleCellSamplesRequest"
4
- },
5
- response: {
6
- typeId: "TermdbSingleCellSamplesResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbSingleCellSamplesPayload
12
- };
@@ -1,28 +0,0 @@
1
- const termChildrenPayload = {
2
- request: {
3
- typeId: "TermChildrenRequest"
4
- },
5
- response: {
6
- typeId: "TermChildrenResponse"
7
- },
8
- examples: [
9
- {
10
- request: {
11
- body: {
12
- genome: "hg38-test",
13
- dslabel: "TermdbTest",
14
- embedder: "localhost",
15
- get_children: 1,
16
- cohortValues: "ABC",
17
- tid: "GO:0000001"
18
- }
19
- },
20
- response: {
21
- header: { status: 200 }
22
- }
23
- }
24
- ]
25
- };
26
- export {
27
- termChildrenPayload
28
- };
@@ -1,12 +0,0 @@
1
- const termsByIdsPayload = {
2
- request: {
3
- typeId: "TermsByIdsRequest"
4
- },
5
- response: {
6
- typeId: "TermsByIdsResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termsByIdsPayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbTopTermsByTypePayload = {
2
- request: {
3
- typeId: "TermdbTopTermsByTypeRequest"
4
- },
5
- response: {
6
- typeId: "TermdbTopTermsByTypeResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbTopTermsByTypePayload
12
- };
@@ -1,12 +0,0 @@
1
- const termdbTopVariablyExpressedGenesPayload = {
2
- request: {
3
- typeId: "TermdbTopVariablyExpressedGenesRequest"
4
- },
5
- response: {
6
- typeId: "TermdbTopVariablyExpressedGenesResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- termdbTopVariablyExpressedGenesPayload
12
- };
@@ -1,49 +0,0 @@
1
- const violinPayload = {
2
- request: {
3
- typeId: "ViolinRequest"
4
- },
5
- response: {
6
- typeId: "ViolinResponse"
7
- },
8
- examples: [
9
- {
10
- request: {
11
- body: {
12
- genome: "hg38-test",
13
- dslabel: "TermdbTest",
14
- embedder: "localhost",
15
- devicePixelRatio: 2.200000047683716,
16
- maxThickness: 150,
17
- screenThickness: 1218,
18
- filter: {
19
- type: "tvslst",
20
- in: true,
21
- join: "",
22
- lst: [
23
- {
24
- tag: "cohortFilter",
25
- type: "tvs",
26
- tvs: { term: { id: "subcohort", type: "categorical" }, values: [{ key: "ABC", label: "ABC" }] }
27
- }
28
- ]
29
- },
30
- svgw: 227.27272234672367,
31
- orientation: "horizontal",
32
- datasymbol: "bean",
33
- radius: 5,
34
- strokeWidth: 0.2,
35
- axisHeight: 60,
36
- rightMargin: 50,
37
- unit: "abs",
38
- termid: "agedx"
39
- }
40
- },
41
- response: {
42
- header: { status: 200 }
43
- }
44
- }
45
- ]
46
- };
47
- export {
48
- violinPayload
49
- };
@@ -1,12 +0,0 @@
1
- const tilePayload = {
2
- request: {
3
- typeId: "TileRequest"
4
- },
5
- response: {
6
- typeId: "TileResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- tilePayload
12
- };
@@ -1,12 +0,0 @@
1
- const wsImagesPayload = {
2
- request: {
3
- typeId: "WSImagesRequest"
4
- },
5
- response: {
6
- typeId: "WSImagesResponse"
7
- }
8
- // examples: []
9
- };
10
- export {
11
- wsImagesPayload
12
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/terms/q.js DELETED
File without changes
File without changes
File without changes
File without changes
package/src/terms/snp.js DELETED
File without changes
package/src/terms/snps.js DELETED
File without changes
package/src/terms/term.js DELETED
File without changes
package/src/terms/tw.js DELETED
File without changes
File without changes
File without changes
@@ -1,117 +0,0 @@
1
- {
2
- const valid = {
3
- type: "float",
4
- id: "someid",
5
- name: "Some Dosage",
6
- bins: {
7
- default: {
8
- type: "regular-bin",
9
- bin_size: 1,
10
- first_bin: {
11
- startunbounded: true,
12
- stop: 1
13
- }
14
- },
15
- less: {
16
- type: "custom-bin",
17
- lst: [{ start: 0, stop: 1 }]
18
- }
19
- }
20
- };
21
- const A = { name: "test", type: "categorical" };
22
- const B = { type: "integer" };
23
- const C = {
24
- // @ts-expect-error, should be string
25
- name: 7,
26
- type: "integer",
27
- bins: {
28
- default: {
29
- type: "regular-bin",
30
- bin_size: 1,
31
- // tsc can detect type errors for deeply nested property values
32
- // @ts-expect-error, does not match either StartUnboundedBin | FullyBoundedBin
33
- first_bin: {
34
- stop: 1
35
- }
36
- },
37
- less: {
38
- type: "custom-bin",
39
- // @ts-expect-error, empty lst array
40
- lst: []
41
- }
42
- }
43
- };
44
- }
45
- {
46
- const A = {
47
- startunbounded: true,
48
- startinclusive: true,
49
- start: 0,
50
- stop: 1,
51
- stopinclusive: true,
52
- stopunbounded: true
53
- };
54
- const B = {};
55
- B.extraProp = "test";
56
- }
57
- {
58
- const A = {
59
- startunbounded: true,
60
- stop: 1
61
- };
62
- const B = { startunbounded: true, start: 0, stop: 1 };
63
- const C = { startunbounded: true };
64
- const D = { startunbounded: true, start: 0, stop: 1, stopunbounded: true };
65
- const E = {};
66
- E.extraProp = "test";
67
- }
68
- {
69
- const A = {
70
- stopunbounded: true,
71
- start: 0
72
- };
73
- const B = { stopunbounded: true, start: 0, stop: 1 };
74
- const C = { stopunbounded: true };
75
- const D = { startunbounded: true, start: 0, stop: 1, stopunbounded: true };
76
- }
77
- {
78
- const A = {
79
- startinclusive: true,
80
- start: 0,
81
- stop: 1
82
- };
83
- const B = { stop: 1 };
84
- const C = { start: 0 };
85
- }
86
- const handlers = {
87
- startUnbounded(bin) {
88
- console.log(bin);
89
- },
90
- fullyBounded(bin) {
91
- console.log(bin);
92
- },
93
- stopUnbounded(bin) {
94
- console.log(bin);
95
- }
96
- };
97
- function correctlyTypedProcessBin(bin) {
98
- if (bin.startunbounded)
99
- handlers.startUnbounded(bin);
100
- else if (bin.stopunbounded)
101
- handlers.stopUnbounded(bin);
102
- else
103
- handlers.fullyBounded(bin);
104
- }
105
- function incorrectProcessBin(bin) {
106
- if (bin.startunbounded)
107
- handlers.startUnbounded(bin);
108
- else if (bin.stopunbounded)
109
- handlers.stopUnbounded(bin);
110
- else {
111
- handlers.startUnbounded(bin);
112
- handlers.stopUnbounded(bin);
113
- handlers.fullyBounded(bin);
114
- handlers.fullyBounded(bin);
115
- handlers.fullyBounded(bin);
116
- }
117
- }
package/src/vocab.js DELETED
File without changes