Skip to content

Commit

Permalink
Show that this fails
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanCavanaugh committed May 6, 2022
1 parent 3126112 commit 898be45
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 73 deletions.
2 changes: 1 addition & 1 deletion src/compiler/corePublic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ts {
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
export const version: string = `${versionMajorMinor}.0-dev`;
export const version: string = `${versionMajorMinor}.0`;

/**
* Type of objects whose values are all of the same type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.


==== /index.ts (3 errors) ====
==== /index.ts (7 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.

export interface LocalInterface extends RequireInterface, ImportInterface {}

import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}

export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });


//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,50): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(7,49): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.


==== /index.ts (3 errors) ====
==== /index.ts (7 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.

export interface LocalInterface extends RequireInterface, ImportInterface {}

import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}

export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });


//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.


==== /index.ts (3 errors) ====
==== /index.ts (7 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.

export interface LocalInterface extends RequireInterface, ImportInterface {}

Expand All @@ -14,9 +22,13 @@
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}

export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"

//// [index.js]
export {};


//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
/index.ts(6,50): error TS1454: `resolution-mode` can only be set for type-only imports.
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(7,49): error TS1454: `resolution-mode` can only be set for type-only imports.
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.


==== /index.ts (3 errors) ====
==== /index.ts (7 errors) ====
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.

export interface LocalInterface extends RequireInterface, ImportInterface {}

Expand All @@ -14,9 +22,13 @@
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
export interface Loc extends Req, Imp {}

export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"

//// [index.js]
export {};


//// [index.d.ts]
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
export interface Loc extends Req, Imp {
}
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(4,39): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
/index.ts(4,39): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,76): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.


==== /index.ts (5 errors) ====
==== /index.ts (6 errors) ====
// incorrect mode
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -18,6 +19,8 @@
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
// not exclusively type-only
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,3 @@ export interface LocalInterface extends RequireInterface, ImportInterface {}
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });


//// [index.d.ts]
import type { RequireInterface } from "pkg";
import { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
export interface LocalInterface extends RequireInterface, ImportInterface {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
/index.ts(4,39): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
/index.ts(4,39): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/index.ts(6,76): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.


==== /index.ts (5 errors) ====
==== /index.ts (6 errors) ====
// incorrect mode
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -18,6 +19,8 @@
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
// not exclusively type-only
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading

0 comments on commit 898be45

Please sign in to comment.