Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0.6 to 1.0.7

2

index.d.ts

@@ -64,2 +64,4 @@ import { ITSTypeBuildIn } from './build-in';

export declare type ITSAnyFunction = (...args: any[]) => any;
export declare type ITSOverwriteThisFunction<T extends any, F extends (...args: any[]) => any> = (this: T, ...args: Parameters<F>) => ReturnType<F>;
export declare type ITSUnpackedThisFunction<T extends (...args: any[]) => any> = T extends (this: infer R, ...args: any[]) => any ? R : unknown;
/**

@@ -66,0 +68,0 @@ * https://stackoverflow.com/questions/49285864/is-there-a-valueof-similar-to-keyof-in-typescript

2

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

@@ -5,0 +5,0 @@ "keywords": [

@@ -67,2 +67,48 @@ # README

### this
```ts
export declare function t1(this: string, a: number): Promise<number>
export declare let t1_this: ITSUnpackedThisFunction<typeof t1>;
// => t1_this is string
```
```ts
export declare function t2(this: string, a: number): number
export declare let t3: ITSOverwriteThisFunction<number, typeof t2>;
t3 = function ()
{
this.toFixed() // => this is number
return 1
}
```
```ts
interface Function2 extends Function
{
bind<T extends any, F extends (...args: any[]) => any>(this: F, thisArg: T, ...argArray: any[]): ITSOverwriteThisFunction<T, F>;
}
export interface t4 extends Function2
{
(): string
}
export declare let t5: t4
export let t6 = t5.bind([] as string[])
t6 = function ()
{
this.includes('') // => this is string[]
return ''
}
```
## other

@@ -69,0 +115,0 @@

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