Skip to content

Commit

Permalink
Disable TypeScript-compatibility for TypeScript older than 3.4.x
Browse files Browse the repository at this point in the history
It is not the responsibility of Zeromq to be buildable on old TypeScript or fullfil technical debts that TypeScript doesn't comply to.
  • Loading branch information
aminya committed Apr 13, 2021
1 parent 24b4c45 commit 5cb664a
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions test/unit/typings-compatibility-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,39 @@ type TestDef = {version: string; minTarget: string; requiredLibs?: string[]}

// NOTE tsc version 2.9.x (and lower) will not work with current typings!
const tsVersions: TestDef[] = [
// typescript 3.0.x - 3.4.x:
// must either have a target that supports AsyncIterators,
// or include a typings library that supports AsyncIterator
{
version: "3.0.x",
minTarget: "es3",
requiredLibs: ["es2015", "ESNext.AsyncIterable"],
},
{
version: "3.1.x",
minTarget: "es3",
requiredLibs: ["es2015", "ESNext.AsyncIterable"],
},
{
version: "3.2.x",
minTarget: "es3",
requiredLibs: ["es2015", "ESNext.AsyncIterable"],
},
{
version: "3.3.x",
minTarget: "es3",
requiredLibs: ["es2015", "ESNext.AsyncIterable"],
},
// TODO doens't work
// // typescript 3.0.x - 3.4.x:
// // must either have a target that supports AsyncIterators,
// // or include a typings library that supports AsyncIterator
// {
// version: "3.0.x",
// minTarget: "es3",
// requiredLibs: ["es2015", "ESNext.AsyncIterable"],
// },
// {
// version: "3.1.x",
// minTarget: "es3",
// requiredLibs: ["es2015", "ESNext.AsyncIterable"],
// },
// {
// version: "3.2.x",
// minTarget: "es3",
// requiredLibs: ["es2015", "ESNext.AsyncIterable"],
// },
// {
// version: "3.3.x",
// minTarget: "es3",
// requiredLibs: ["es2015", "ESNext.AsyncIterable"],
// },
{
version: "3.4.x",
minTarget: "es3",
requiredLibs: ["es2015", "ESNext.AsyncIterable"],
},
{version: "3.0.x", minTarget: "esnext"},
{version: "3.1.x", minTarget: "esnext"},
{version: "3.2.x", minTarget: "esnext"},
{version: "3.3.x", minTarget: "esnext"},
// {version: "3.0.x", minTarget: "esnext"},
// {version: "3.1.x", minTarget: "esnext"},
// {version: "3.2.x", minTarget: "esnext"},
// {version: "3.3.x", minTarget: "esnext"},
{version: "3.4.x", minTarget: "esnext"},

// typescript 3.5.x - 3.7.x:
Expand Down

0 comments on commit 5cb664a

Please sign in to comment.