@nmtjs/type 0.4.3 → 0.4.5

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.
package/dist/temporal.js CHANGED
@@ -1,17 +1,9 @@
1
- import { t as baseT } from "./index.js";
2
1
  import { DurationType, PlainDateTimeType, PlainDateType, PlainMonthDayType, PlainTimeType, PlainYearMonthType, ZonedDateTimeType } from "./types/temporal.js";
3
- function extend(value) {
4
- return Object.assign({}, value, {
5
- temporal: {
6
- plainDate: ()=>new PlainDateType(),
7
- plainDatetime: ()=>new PlainDateTimeType(),
8
- plainTime: ()=>new PlainTimeType(),
9
- zonedDatetime: ()=>new ZonedDateTimeType(),
10
- duration: ()=>new DurationType(),
11
- plainYearMonth: ()=>new PlainYearMonthType(),
12
- plainMonthDay: ()=>new PlainMonthDayType()
13
- }
14
- });
15
- }
16
- export const t = extend(baseT);
2
+ export const plainDate = ()=>new PlainDateType();
3
+ export const plainDatetime = ()=>new PlainDateTimeType();
4
+ export const plainTime = ()=>new PlainTimeType();
5
+ export const zonedDatetime = ()=>new ZonedDateTimeType();
6
+ export const duration = ()=>new DurationType();
7
+ export const plainYearMonth = ()=>new PlainYearMonthType();
8
+ export const plainMonthDay = ()=>new PlainMonthDayType();
17
9
  export { DurationType, PlainDateTimeType, PlainDateType, PlainMonthDayType, PlainTimeType, PlainYearMonthType, ZonedDateTimeType, };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/temporal.ts"],"sourcesContent":["import { t as baseT } from './index.ts'\nimport {\n DurationType,\n PlainDateTimeType,\n PlainDateType,\n PlainMonthDayType,\n PlainTimeType,\n PlainYearMonthType,\n ZonedDateTimeType,\n} from './types/temporal.ts'\n\nfunction extend<T extends typeof baseT>(value: T) {\n return Object.assign({}, value, {\n temporal: {\n plainDate: () => new PlainDateType(),\n plainDatetime: () => new PlainDateTimeType(),\n plainTime: () => new PlainTimeType(),\n zonedDatetime: () => new ZonedDateTimeType(),\n duration: () => new DurationType(),\n plainYearMonth: () => new PlainYearMonthType(),\n plainMonthDay: () => new PlainMonthDayType(),\n },\n })\n}\n\nexport const t = extend(baseT)\n\nexport {\n DurationType,\n PlainDateTimeType,\n PlainDateType,\n PlainMonthDayType,\n PlainTimeType,\n PlainYearMonthType,\n ZonedDateTimeType,\n}\n"],"names":["t","baseT","DurationType","PlainDateTimeType","PlainDateType","PlainMonthDayType","PlainTimeType","PlainYearMonthType","ZonedDateTimeType","extend","value","Object","assign","temporal","plainDate","plainDatetime","plainTime","zonedDatetime","duration","plainYearMonth","plainMonthDay"],"mappings":"AAAA,SAASA,KAAKC,KAAK,QAAQ,aAAY;AACvC,SACEC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,QACZ,sBAAqB;AAE5B,SAASC,OAA+BC,KAAQ;IAC9C,OAAOC,OAAOC,MAAM,CAAC,CAAC,GAAGF,OAAO;QAC9BG,UAAU;YACRC,WAAW,IAAM,IAAIV;YACrBW,eAAe,IAAM,IAAIZ;YACzBa,WAAW,IAAM,IAAIV;YACrBW,eAAe,IAAM,IAAIT;YACzBU,UAAU,IAAM,IAAIhB;YACpBiB,gBAAgB,IAAM,IAAIZ;YAC1Ba,eAAe,IAAM,IAAIf;QAC3B;IACF;AACF;AAEA,OAAO,MAAML,IAAIS,OAAOR,OAAM;AAE9B,SACEC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,KAClB"}
1
+ {"version":3,"sources":["../../src/temporal.ts"],"sourcesContent":["import {\n DurationType,\n PlainDateTimeType,\n PlainDateType,\n PlainMonthDayType,\n PlainTimeType,\n PlainYearMonthType,\n ZonedDateTimeType,\n} from './types/temporal.ts'\n\nexport const plainDate = () => new PlainDateType()\nexport const plainDatetime = () => new PlainDateTimeType()\nexport const plainTime = () => new PlainTimeType()\nexport const zonedDatetime = () => new ZonedDateTimeType()\nexport const duration = () => new DurationType()\nexport const plainYearMonth = () => new PlainYearMonthType()\nexport const plainMonthDay = () => new PlainMonthDayType()\n\nexport {\n DurationType,\n PlainDateTimeType,\n PlainDateType,\n PlainMonthDayType,\n PlainTimeType,\n PlainYearMonthType,\n ZonedDateTimeType,\n}\n"],"names":["DurationType","PlainDateTimeType","PlainDateType","PlainMonthDayType","PlainTimeType","PlainYearMonthType","ZonedDateTimeType","plainDate","plainDatetime","plainTime","zonedDatetime","duration","plainYearMonth","plainMonthDay"],"mappings":"AAAA,SACEA,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,QACZ,sBAAqB;AAE5B,OAAO,MAAMC,YAAY,IAAM,IAAIL,gBAAe;AAClD,OAAO,MAAMM,gBAAgB,IAAM,IAAIP,oBAAmB;AAC1D,OAAO,MAAMQ,YAAY,IAAM,IAAIL,gBAAe;AAClD,OAAO,MAAMM,gBAAgB,IAAM,IAAIJ,oBAAmB;AAC1D,OAAO,MAAMK,WAAW,IAAM,IAAIX,eAAc;AAChD,OAAO,MAAMY,iBAAiB,IAAM,IAAIP,qBAAoB;AAC5D,OAAO,MAAMQ,gBAAgB,IAAM,IAAIV,oBAAmB;AAE1D,SACEH,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,KAClB"}
package/package.json CHANGED
@@ -21,12 +21,12 @@
21
21
  "peerDependencies": {
22
22
  "@sinclair/typebox": "^0.33.7",
23
23
  "temporal-polyfill": "^0.2.5",
24
- "@nmtjs/common": "0.4.3"
24
+ "@nmtjs/common": "0.4.5"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@sinclair/typebox": "^0.33.7",
28
28
  "temporal-polyfill": "^0.2.5",
29
- "@nmtjs/common": "0.4.3"
29
+ "@nmtjs/common": "0.4.5"
30
30
  },
31
31
  "files": [
32
32
  "src",
@@ -35,7 +35,7 @@
35
35
  "LICENSE.md",
36
36
  "README.md"
37
37
  ],
38
- "version": "0.4.3",
38
+ "version": "0.4.5",
39
39
  "scripts": {
40
40
  "build": "neemata-build -p neutral --root=./src './**/*.ts'",
41
41
  "type-check": "tsc --noEmit"
package/src/temporal.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { t as baseT } from './index.ts'
2
1
  import {
3
2
  DurationType,
4
3
  PlainDateTimeType,
@@ -9,21 +8,13 @@ import {
9
8
  ZonedDateTimeType,
10
9
  } from './types/temporal.ts'
11
10
 
12
- function extend<T extends typeof baseT>(value: T) {
13
- return Object.assign({}, value, {
14
- temporal: {
15
- plainDate: () => new PlainDateType(),
16
- plainDatetime: () => new PlainDateTimeType(),
17
- plainTime: () => new PlainTimeType(),
18
- zonedDatetime: () => new ZonedDateTimeType(),
19
- duration: () => new DurationType(),
20
- plainYearMonth: () => new PlainYearMonthType(),
21
- plainMonthDay: () => new PlainMonthDayType(),
22
- },
23
- })
24
- }
25
-
26
- export const t = extend(baseT)
11
+ export const plainDate = () => new PlainDateType()
12
+ export const plainDatetime = () => new PlainDateTimeType()
13
+ export const plainTime = () => new PlainTimeType()
14
+ export const zonedDatetime = () => new ZonedDateTimeType()
15
+ export const duration = () => new DurationType()
16
+ export const plainYearMonth = () => new PlainYearMonthType()
17
+ export const plainMonthDay = () => new PlainMonthDayType()
27
18
 
28
19
  export {
29
20
  DurationType,