Socket
Socket
Sign inDemoInstall

ts-essentials

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-essentials - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

dist/types.d.ts

@@ -35,2 +35,4 @@ /** Essentials */

};
/** Easily extract the type of a given object's values */
export declare type ValueOf<T> = T[keyof T];
export {};

6

package.json

@@ -9,3 +9,3 @@ {

],
"version": "1.0.3",
"version": "1.0.4",
"main": "dist/index.js",

@@ -19,3 +19,4 @@ "types": "dist/types.d.ts",

"prepublishOnly": "yarn test && yarn build",
"test": "tsc --noEmit"
"test": "prettier -c **/*.ts && tsc --noEmit",
"test:fix": "prettier --write **/*.ts && tsc --noEmit"
},

@@ -27,4 +28,5 @@ "files": [

"conditional-type-checks": "^0.5.0",
"prettier": "^1.16.1",
"typescript": "^3.2.2"
}
}

@@ -7,2 +7,3 @@ <p align="center">

<img alt="Downloads" src="https://img.shields.io/npm/dm/ts-essentials.svg">
<img alt="Build status" src="https://circleci.com/gh/krzkaczor/ts-essentials.svg?style=svg">
<a href="/package.json"><img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>

@@ -37,3 +38,4 @@ </p>

- [Literal types](#literal-types)
- [Exhaustive switch cases](#exhaustive-switch-cases-in-typescript)
- [Exhaustive switch cases](#exhaustive-switch-cases)
- [ValueOf](#valueof-type)

@@ -162,1 +164,18 @@ ### Basic:

```
### ValueOf type
```typescript
const obj = {
id: "123e4567-e89b-12d3-a456-426655440000",
name: "Test object",
timestamp: 1548768231486,
};
type objKeys = ValueOf<typeof obj>; // string | number
```
## Contributing
All contributions are welcomed [Read more](./CONTRIBUTING.md)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc