Socket
Socket
Sign inDemoInstall

ts-type

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-type - npm Package Compare versions

Comparing version 1.2.33 to 1.2.34

22

CHANGELOG.md

@@ -6,2 +6,24 @@ # Change Log

## [1.2.34](https://github.com/bluelovers/ws-ts-type/compare/ts-type@1.2.33...ts-type@1.2.34) (2020-09-04)
### ✨ Features
* **deps:** move `ts-toolbelt` to peer deps ([3d4ef95](https://github.com/bluelovers/ws-ts-type/commit/3d4ef95424387ce68f3e45b35bb8921d5dfdecf5))
* get readonly keys of an Object. ([41de826](https://github.com/bluelovers/ws-ts-type/commit/41de826116a5fa5c911ac32d56e71ee140622bd4))
### 🚨 Tests
* use `[@ts-expect-error](https://github.com/ts-expect-error)` ([c446116](https://github.com/bluelovers/ws-ts-type/commit/c446116adf132734fbacaf28ef8c47ca840f6ffb))
### BREAKING CHANGE
* **deps:** `ts-toolbelt` is peer deps now
## [1.2.33](https://github.com/bluelovers/ws-ts-type/compare/ts-type@1.2.32...ts-type@1.2.33) (2020-09-04)

@@ -8,0 +30,0 @@

@@ -18,1 +18,29 @@ /**

export declare type ITSKeyIsPartialOfRecord<T, K extends keyof T> = Omit<T, K> extends T ? K : never;
/**
* returns a union of the readonly keys of an Object.
*
* @see https://github.com/type-challenges/type-challenges/blob/master/questions/5-extreme-readonly-keys/README.md
* @see https://github.com/type-challenges/type-challenges/issues/87
*
* @alias ITSGetReadonlyKeys
*
* @example
* interface Todo {
* readonly title: string
* readonly description: string
* completed: boolean
* }
* type Keys = ITSKeyOfRecordExtractReadonly<Todo>
* // expected to be "title" | "description"
*/
export declare type ITSKeyOfRecordExtractReadonly<T> = {
[K in keyof T]-?: (<U>() => U extends {
-readonly [P in K]: T[K];
} ? 1 : 2) extends (<U>() => U extends {
[P in K]: T[K];
} ? 1 : 2) ? never : K;
}[keyof T];
export type { ITSKeyOfRecordExtractReadonly as ITSGetReadonlyKeys };
export declare type ITSKeyOfRecordExcludeReadonly<T> = Exclude<keyof T, ITSKeyOfRecordExtractReadonly<T>>;
export declare type ITSKeyIsReadonlyOfRecord<T, K extends ITSKeyOfRecordExtractReadonly<T>> = Extract<K, ITSKeyOfRecordExtractReadonly<T>>;
export declare type ITSKeyIsNotReadonlyOfRecord<T, K extends ITSKeyOfRecordExcludeReadonly<T>> = Extract<K, ITSKeyOfRecordExcludeReadonly<T>>;

8

package.json
{
"name": "ts-type",
"version": "1.2.33",
"version": "1.2.34",
"description": "add some typescript type and re-export some build-in typescript type",

@@ -58,9 +58,9 @@ "keywords": [

"dependencies": {
"ts-toolbelt": "^8.0.4",
"typedarray-dts": "^1.0.0"
},
"peerDependencies": {
"@types/bluebird": "*"
"@types/bluebird": "*",
"ts-toolbelt": "^8.0.4"
},
"gitHead": "9d59efd044f0518e59b9d8ee7f74ce4fdf1e6239"
"gitHead": "b55c9cc11a3534d3fb66f7a262630ea4a7f43bfc"
}

@@ -129,2 +129,5 @@ # README

- https://github.com/millsp/ts-toolbelt
- https://github.com/type-challenges/type-challenges
- https://github.com/andnp/SimplyTyped
- https://github.com/piotrwitek/utility-types
-

Sorry, the diff of this file is not supported yet

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