From dc553b9a206813972373307021774b9f70a43758 Mon Sep 17 00:00:00 2001 From: jiangshanmeta <540118044@qq.com> Date: Fri, 7 Jul 2023 20:57:34 +0800 Subject: [PATCH] feat: date-get-day --- package.json | 7 ++++++- src/entrypoints/date-get-day.d.ts | 3 +++ src/entrypoints/recommended.d.ts | 1 + src/tests/date-get-day.ts | 7 +++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/entrypoints/date-get-day.d.ts create mode 100644 src/tests/date-get-day.ts diff --git a/package.json b/package.json index 09f4bc1..3cef41f 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,11 @@ "types": "./dist/storage.d.ts", "import": "./dist/storage.mjs", "default": "./dist/storage.js" + }, + "./date-get-day": { + "types": "./dist/date-get-day.d.ts", + "import": "./dist/date-get-day.mjs", + "default": "./dist/date-get-day.js" } }, "keywords": [], @@ -105,4 +110,4 @@ "tabWidth": 2, "useTabs": false } -} +} \ No newline at end of file diff --git a/src/entrypoints/date-get-day.d.ts b/src/entrypoints/date-get-day.d.ts new file mode 100644 index 0000000..95e92a6 --- /dev/null +++ b/src/entrypoints/date-get-day.d.ts @@ -0,0 +1,3 @@ +interface Date { + getDay(): 0 | 1 | 2 | 3 | 4 | 5 | 6 +} \ No newline at end of file diff --git a/src/entrypoints/recommended.d.ts b/src/entrypoints/recommended.d.ts index 7e6b2b4..ccf9475 100644 --- a/src/entrypoints/recommended.d.ts +++ b/src/entrypoints/recommended.d.ts @@ -6,3 +6,4 @@ /// /// /// +/// \ No newline at end of file diff --git a/src/tests/date-get-day.ts b/src/tests/date-get-day.ts new file mode 100644 index 0000000..69c590c --- /dev/null +++ b/src/tests/date-get-day.ts @@ -0,0 +1,7 @@ +import { doNotExecute, Equal, Expect } from "./utils"; + +doNotExecute(() => { + const result = new Date().getDay(); + + type tests = [Expect>]; +});