Skip to content

Commit f6882ca

Browse files
authored
[parse] Add better support for TS 3.7 (DefinitelyTyped#42459)
1 parent 499b250 commit f6882ca

File tree

9 files changed

+3114
-3
lines changed

9 files changed

+3114
-3
lines changed

types/parse/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Patrick O'Sullivan <https://github.com/REPTILEHAUS>
2323
// Jerome De Leon <https://github.com/JeromeDeLeon>
2424
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
25-
// TypeScript Version: 3.7
25+
// TypeScript Version: 3.5
2626

2727
/// <reference types="node" />
2828
/// <reference path="node.d.ts" />
@@ -508,7 +508,7 @@ namespace Parse {
508508
: T extends RegExp
509509
? string
510510
: T extends Array<infer R>
511-
? Array<Encode<R>>
511+
? any[]
512512
: T extends object
513513
? ToJSON<T>
514514
: T

types/parse/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"private": true,
3+
"types": "index",
4+
"typesVersions": {
5+
">=3.7.0-0": { "*": ["ts3.7/*"] }
6+
}
7+
}

types/parse/parse-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ function testObject() {
12931293
JSONTyped.someDate;
12941294
// $ExpectType ToJSON<AttributesAllTypes>
12951295
JSONTyped.someJSONObject;
1296-
// $ExpectType ToJSON<AttributesAllTypes>[]
1296+
// $ExpectType any[]
12971297
JSONTyped.someJSONArray;
12981298
// $ExpectType string
12991299
JSONTyped.someRegExp;

0 commit comments

Comments
 (0)