@jswork/types 1.0.1

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # types
2
+ > Common types for typescript.
3
+
4
+ ## Install
5
+ ```shell
6
+ yarn add --dev @jswork/types
7
+ ```
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /// <reference types="./modules/data.d.ts" />
2
+ /// <reference types="./modules/event.d.ts" />
3
+ /// <reference types="./modules/lang.d.ts" />
4
+ /// <reference types="./modules/util.d.ts" />
@@ -0,0 +1 @@
1
+ type KeyValue<T> = { label: string; value: T };
@@ -0,0 +1,7 @@
1
+ export interface StdEvent {
2
+ target: { value: any };
3
+ }
4
+
5
+ export interface StdCustomEvent {
6
+ detail: { value: any };
7
+ }
@@ -0,0 +1,2 @@
1
+ type Primitive = string | number | boolean | null | undefined;
2
+ type AnyObject = Record<string, any>;
@@ -0,0 +1,3 @@
1
+ type Prettify<T> = {
2
+ [K in keyof T]: T[K];
3
+ } & {};
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@jswork/types",
3
+ "version": "1.0.1",
4
+ "description": "Common types for typescript.",
5
+ "homepage": "https://github.com/afeiship/types",
6
+ "license": "MIT",
7
+ "main": "index.d.ts",
8
+ "scripts": {
9
+ "release": "release-it"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "keywords": [
16
+ "types",
17
+ "typing",
18
+ "jswork",
19
+ "jsw"
20
+ ]
21
+ }