cypress 15.8.2 → 15.9.0

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.
@@ -29,19 +29,19 @@ declare module "../index" {
29
29
  * @param string The string to capitalize.
30
30
  * @return Returns the capitalized string.
31
31
  */
32
- capitalize(string?: string): string;
32
+ capitalize<T extends string>(string?: T): string extends T ? string : Capitalize<Lowercase<T>>;
33
33
  }
34
34
  interface LoDashImplicitWrapper<TValue> {
35
35
  /**
36
36
  * @see _.capitalize
37
37
  */
38
- capitalize(): string;
38
+ capitalize(): string extends TValue ? string : Capitalize<Lowercase<TValue extends string ? TValue : never>>;
39
39
  }
40
40
  interface LoDashExplicitWrapper<TValue> {
41
41
  /**
42
42
  * @see _.capitalize
43
43
  */
44
- capitalize(): StringChain;
44
+ capitalize(): StringChain<string extends TValue ? string : Capitalize<Lowercase<TValue extends string ? TValue : never>>>;
45
45
  }
46
46
 
47
47
  interface LoDashStatic {
@@ -97,7 +97,7 @@ declare module "../index" {
97
97
  *
98
98
  * Note: No other characters are escaped. To escape additional characters use a third-party library like he.
99
99
  *
100
- * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML
100
+ * Though the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML
101
101
  * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s
102
102
  * article (under "semi-related fun fact") for more details.
103
103
  *
@@ -198,19 +198,19 @@ declare module "../index" {
198
198
  * @param string The string to convert.
199
199
  * @return Returns the converted string.
200
200
  */
201
- lowerFirst(string?: string): string;
201
+ lowerFirst<T extends string = string>(string?: T): Uncapitalize<T>;
202
202
  }
203
203
  interface LoDashImplicitWrapper<TValue> {
204
204
  /**
205
205
  * @see _.lowerFirst
206
206
  */
207
- lowerFirst(): string;
207
+ lowerFirst(): TValue extends string ? Uncapitalize<TValue> : string;
208
208
  }
209
209
  interface LoDashExplicitWrapper<TValue> {
210
210
  /**
211
211
  * @see _.lowerFirst
212
212
  */
213
- lowerFirst(): StringChain;
213
+ lowerFirst(): StringChain<TValue extends string ? Uncapitalize<TValue> : string>;
214
214
  }
215
215
 
216
216
  interface LoDashStatic {
@@ -475,7 +475,7 @@ declare module "../index" {
475
475
  /**
476
476
  * @see _.sourceURL
477
477
  */
478
- sourceURL?: string;
478
+ sourceURL?: string | undefined;
479
479
  }
480
480
  interface TemplateExecutor {
481
481
  (data?: object): string;
@@ -533,19 +533,19 @@ declare module "../index" {
533
533
  * @param string The string to convert.
534
534
  * @return Returns the lower cased string.
535
535
  */
536
- toLower(string?: string): string;
536
+ toLower<T extends string = string>(string?: T): Lowercase<T>;
537
537
  }
538
538
  interface LoDashImplicitWrapper<TValue> {
539
539
  /**
540
540
  * @see _.toLower
541
541
  */
542
- toLower(): string;
542
+ toLower(): TValue extends string ? Lowercase<TValue> : string;
543
543
  }
544
544
  interface LoDashExplicitWrapper<TValue> {
545
545
  /**
546
546
  * @see _.toLower
547
547
  */
548
- toLower(): StringChain;
548
+ toLower(): StringChain<TValue extends string ? Lowercase<TValue> : string>;
549
549
  }
550
550
 
551
551
  interface LoDashStatic {
@@ -555,19 +555,19 @@ declare module "../index" {
555
555
  * @param string The string to convert.
556
556
  * @return Returns the upper cased string.
557
557
  */
558
- toUpper(string?: string): string;
558
+ toUpper<T extends string = string>(string?: T): Uppercase<T>;
559
559
  }
560
560
  interface LoDashImplicitWrapper<TValue> {
561
561
  /**
562
562
  * @see _.toUpper
563
563
  */
564
- toUpper(): string;
564
+ toUpper(): TValue extends string ? Uppercase<TValue> : string;
565
565
  }
566
566
  interface LoDashExplicitWrapper<TValue> {
567
567
  /**
568
568
  * @see _.toUpper
569
569
  */
570
- toUpper(): StringChain;
570
+ toUpper(): StringChain<TValue extends string ? Uppercase<TValue> : string>;
571
571
  }
572
572
 
573
573
  interface LoDashStatic {
@@ -655,15 +655,15 @@ declare module "../index" {
655
655
  /**
656
656
  * @see _.length
657
657
  */
658
- length?: number;
658
+ length?: number | undefined;
659
659
  /**
660
660
  * @see _.omission
661
661
  */
662
- omission?: string;
662
+ omission?: string | undefined;
663
663
  /**
664
664
  * @see _.separator
665
665
  */
666
- separator?: string | RegExp;
666
+ separator?: string | RegExp | undefined;
667
667
  }
668
668
  interface LoDashStatic {
669
669
  /**
@@ -744,19 +744,19 @@ declare module "../index" {
744
744
  * @param string The string to convert.
745
745
  * @return Returns the converted string.
746
746
  */
747
- upperFirst(string?: string): string;
747
+ upperFirst<T extends string = string>(string?: T): Capitalize<T>;
748
748
  }
749
749
  interface LoDashImplicitWrapper<TValue> {
750
750
  /**
751
751
  * @see _.upperFirst
752
752
  */
753
- upperFirst(): string;
753
+ upperFirst(): TValue extends string ? Capitalize<TValue> : string;
754
754
  }
755
755
  interface LoDashExplicitWrapper<TValue> {
756
756
  /**
757
757
  * @see _.upperFirst
758
758
  */
759
- upperFirst(): StringChain;
759
+ upperFirst(): StringChain<TValue extends string ? Capitalize<TValue> : string>;
760
760
  }
761
761
 
762
762
  interface LoDashStatic {
@@ -777,7 +777,7 @@ declare module "../index" {
777
777
  /**
778
778
  * @see _.words
779
779
  */
780
- words(pattern?: string | RegExp): string[];
780
+ words(pattern?: string | RegExp): Collection<string>;
781
781
  }
782
782
  interface LoDashExplicitWrapper<TValue> {
783
783
  /**
@@ -79,7 +79,8 @@ declare module "../index" {
79
79
  * func({ 'a': '1', 'b': '2' });
80
80
  * // => 'no match'
81
81
  */
82
- cond<T, R>(pairs: Array<CondPair<T, R>>): (Target: T) => R;
82
+ cond<R>(pairs: Array<CondPairNullary<R>>): () => R;
83
+ cond<T, R>(pairs: Array<CondPairUnary<T, R>>): (Target: T) => R;
83
84
  }
84
85
 
85
86
  type ConformsPredicateObject<T> = {
@@ -424,7 +425,7 @@ declare module "../index" {
424
425
  /**
425
426
  * @see _.iteratee
426
427
  */
427
- iteratee(func: string | object): (...args: any[]) => any;
428
+ iteratee(func: symbol | number | string | object): (...args: any[]) => any;
428
429
  }
429
430
  interface Function<T extends (...args: any) => any> {
430
431
  /**
@@ -602,7 +603,7 @@ declare module "../index" {
602
603
  /**
603
604
  * @see _.chain
604
605
  */
605
- chain?: boolean;
606
+ chain?: boolean | undefined;
606
607
  }
607
608
  interface LoDashStatic {
608
609
  /**