Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg authored Feb 25, 2020
1 parent e7edc7c commit 552fe47
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion types/mangopay2-nodejs-sdk/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ declare namespace MangoPay {
type OtherData = BaseData & OtherDetails;

type Data = OtherData | CAData | GBData | IBANData | USData;
type DataIntersection = OtherData & CAData & GBData & IBANData & USData;
type DataIntersection = OtherData & CAData & GBData & IBANData & USData & { Type: never };
type CreationDetails =
| OtherDetails
| CADetails
Expand Down
2 changes: 1 addition & 1 deletion types/mocha-sugar-free/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ declare namespace Mocha {
test: TestFunction;
}

type AnyInterface = Omit<BDD & TDD & QUnit, 'detectedInterface'> & BaseInterface;
type AnyInterface = Omit<BDD, 'detectedInterface'> & Omit<TDD, 'detectedInterface'> & Omit<QUnit, 'detectedInterface'> & BaseInterface;
// #endregion

// #region Test context
Expand Down
9 changes: 6 additions & 3 deletions types/mysql/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export interface GeometryType extends Array<{ x: number, y: number } | GeometryT
}

export type TypeCast = boolean | (
(field: FieldInfo
(field: UntypedFieldInfo
& { type: string, length: number, string(): string, buffer(): Buffer, geometry(): null | GeometryType },
next: () => void) => any);

Expand Down Expand Up @@ -701,7 +701,7 @@ export const enum Types {
GEOMETRY = 0xff, // aka GEOMETRY
}

export interface FieldInfo {
export interface UntypedFieldInfo {
catalog: string;
db: string;
table: string;
Expand All @@ -710,10 +710,13 @@ export interface FieldInfo {
orgName: string;
charsetNr: number;
length: number;
type: Types;
flags: number;
decimals: number;
default?: string;
zeroFill: boolean;
protocol41: boolean;
}

export interface FieldInfo extends UntypedFieldInfo {
type: Types;
}
17 changes: 7 additions & 10 deletions types/styled-components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,18 @@ type ThemedStyledComponentFactories<T extends object> = {

export type StyledComponentInnerComponent<
C extends React.ComponentType<any>
> = C extends
| StyledComponent<infer I, any, any, any>
| StyledComponent<infer I, any, any>
? I
: C;
> = C extends StyledComponent<infer I, any, any, any> ? I :
C extends StyledComponent<infer I, any, any> ? I :
C;
export type StyledComponentPropsWithRef<
C extends keyof JSX.IntrinsicElements | React.ComponentType<any>
> = C extends AnyStyledComponent
? React.ComponentPropsWithRef<StyledComponentInnerComponent<C>>
: React.ComponentPropsWithRef<C>;
export type StyledComponentInnerOtherProps<C extends AnyStyledComponent> = C extends
| StyledComponent<any, any, infer O, any>
| StyledComponent<any, any, infer O>
? O
: never;
export type StyledComponentInnerOtherProps<C extends AnyStyledComponent> =
C extends StyledComponent<any, any, infer O, any> ? O :
C extends StyledComponent<any, any, infer O> ? O :
never;
export type StyledComponentInnerAttrs<
C extends AnyStyledComponent
> = C extends StyledComponent<any, any, any, infer A> ? A : never;
Expand Down
17 changes: 7 additions & 10 deletions types/styled-components/ts3.7/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,18 @@ type ThemedStyledComponentFactories<T extends object> = {

export type StyledComponentInnerComponent<
C extends React.ComponentType<any>
> = C extends
| StyledComponent<infer I, any, any, any>
| StyledComponent<infer I, any, any>
? I
: C;
> = C extends StyledComponent<infer I, any, any, any> ? I :
C extends StyledComponent<infer I, any, any> ? I :
C;
export type StyledComponentPropsWithRef<
C extends keyof JSX.IntrinsicElements | React.ComponentType<any>
> = C extends AnyStyledComponent
? React.ComponentPropsWithRef<StyledComponentInnerComponent<C>>
: React.ComponentPropsWithRef<C>;
export type StyledComponentInnerOtherProps<C extends AnyStyledComponent> = C extends
| StyledComponent<any, any, infer O, any>
| StyledComponent<any, any, infer O>
? O
: never;
export type StyledComponentInnerOtherProps<C extends AnyStyledComponent> =
C extends StyledComponent<any, any, infer O, any> ? O :
C extends StyledComponent<any, any, infer O> ? O :
never;
export type StyledComponentInnerAttrs<
C extends AnyStyledComponent
> = C extends StyledComponent<any, any, any, infer A> ? A : never;
Expand Down
4 changes: 2 additions & 2 deletions types/tablesorter/test/Methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ export class TestMethods<T extends HTMLElement> {
$.tablesorter.getData($(), config.headers[0], "sorter");
// $ExpectType string | boolean | undefined
$.tablesorter.getData($()[0], config.headers[0], "sorter");
// $ExpectType "top" | "bottom" | "zero" | "min" | "max" | undefined
// $ExpectType "top" | "bottom" | "zero" | "min" | "max" | undefined || "top" | "bottom" | "min" | "max" | "zero" | undefined
$.tablesorter.getData($(), config.headers[0], "string");
// $ExpectType "top" | "bottom" | "zero" | "min" | "max" | undefined
// $ExpectType "top" | "bottom" | "zero" | "min" | "max" | undefined || "top" | "bottom" | "min" | "max" | "zero" | undefined
$.tablesorter.getData($()[0], config.headers[0], "string");

// $ExpectType string[]
Expand Down
2 changes: 1 addition & 1 deletion types/vuelidate/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Validation } from './vuelidate'

declare module 'vue/types/vue' {
type ValidationProperties<V> = {
[P in keyof V]?: Validation & ValidationProperties<V[P]> & ValidationEvaluation
[P in Exclude<keyof V, '$v'>]?: Validation & ValidationProperties<V[P]> & ValidationEvaluation
}

interface ValidationGroups {
Expand Down

0 comments on commit 552fe47

Please sign in to comment.