mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Test update for using allowJs instead of --jsExtensions
This commit is contained in:
parent
ba3d34f9df
commit
382b86bd2c
@ -3,11 +3,11 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesNotSpecifiedWithJsExtensions",
|
||||
"project": "DifferentNamesNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"DifferentNamesNotSpecifiedWithJsExtensions/a.ts",
|
||||
"DifferentNamesNotSpecifiedWithJsExtensions/b.js"
|
||||
"DifferentNamesNotSpecifiedWithAllowJs/a.ts",
|
||||
"DifferentNamesNotSpecifiedWithAllowJs/b.js"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"test.js",
|
||||
@ -3,11 +3,11 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesNotSpecifiedWithJsExtensions",
|
||||
"project": "DifferentNamesNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"DifferentNamesNotSpecifiedWithJsExtensions/a.ts",
|
||||
"DifferentNamesNotSpecifiedWithJsExtensions/b.js"
|
||||
"DifferentNamesNotSpecifiedWithAllowJs/a.ts",
|
||||
"DifferentNamesNotSpecifiedWithAllowJs/b.js"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"test.js",
|
||||
@ -3,11 +3,11 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesSpecifiedWithJsExtensions",
|
||||
"project": "DifferentNamesSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"DifferentNamesSpecifiedWithJsExtensions/a.ts",
|
||||
"DifferentNamesSpecifiedWithJsExtensions/b.js"
|
||||
"DifferentNamesSpecifiedWithAllowJs/a.ts",
|
||||
"DifferentNamesSpecifiedWithAllowJs/b.js"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"test.js",
|
||||
@ -3,11 +3,11 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesSpecifiedWithJsExtensions",
|
||||
"project": "DifferentNamesSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"DifferentNamesSpecifiedWithJsExtensions/a.ts",
|
||||
"DifferentNamesSpecifiedWithJsExtensions/b.js"
|
||||
"DifferentNamesSpecifiedWithAllowJs/a.ts",
|
||||
"DifferentNamesSpecifiedWithAllowJs/b.js"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"test.js",
|
||||
@ -3,10 +3,10 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsSpecifiedWithJsExtensions",
|
||||
"project": "SameNameDTsSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameDTsSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameDTsSpecifiedWithAllowJs/a.d.ts"
|
||||
],
|
||||
"emittedFiles": []
|
||||
}
|
||||
@ -3,10 +3,10 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsSpecifiedWithJsExtensions",
|
||||
"project": "SameNameDTsSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameDTsSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameDTsSpecifiedWithAllowJs/a.d.ts"
|
||||
],
|
||||
"emittedFiles": []
|
||||
}
|
||||
@ -3,10 +3,10 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsNotSpecifiedWithJsExtensions",
|
||||
"project": "SameNameDTsNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameDTsNotSpecifiedWithAllowJs/a.d.ts"
|
||||
],
|
||||
"emittedFiles": []
|
||||
}
|
||||
@ -3,10 +3,10 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsNotSpecifiedWithJsExtensions",
|
||||
"project": "SameNameDTsNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameDTsNotSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameDTsNotSpecifiedWithAllowJs/a.d.ts"
|
||||
],
|
||||
"emittedFiles": []
|
||||
}
|
||||
@ -3,13 +3,13 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameFilesNotSpecifiedWithJsExtensions",
|
||||
"project": "SameNameFilesNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.ts"
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.ts"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.js",
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.js",
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.d.ts"
|
||||
]
|
||||
}
|
||||
@ -3,13 +3,13 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameFilesNotSpecifiedWithJsExtensions",
|
||||
"project": "SameNameFilesNotSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.ts"
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.ts"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.js",
|
||||
"SameNameFilesNotSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.js",
|
||||
"SameNameFilesNotSpecifiedWithAllowJs/a.d.ts"
|
||||
]
|
||||
}
|
||||
@ -3,13 +3,13 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameTsSpecifiedWithJsExtensions",
|
||||
"project": "SameNameTsSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.ts"
|
||||
"SameNameTsSpecifiedWithAllowJs/a.ts"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.js",
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameTsSpecifiedWithAllowJs/a.js",
|
||||
"SameNameTsSpecifiedWithAllowJs/a.d.ts"
|
||||
]
|
||||
}
|
||||
@ -3,13 +3,13 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameTsSpecifiedWithJsExtensions",
|
||||
"project": "SameNameTsSpecifiedWithAllowJs",
|
||||
"resolvedInputFiles": [
|
||||
"lib.d.ts",
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.ts"
|
||||
"SameNameTsSpecifiedWithAllowJs/a.ts"
|
||||
],
|
||||
"emittedFiles": [
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.js",
|
||||
"SameNameTsSpecifiedWithJsExtensions/a.d.ts"
|
||||
"SameNameTsSpecifiedWithAllowJs/a.js",
|
||||
"SameNameTsSpecifiedWithAllowJs/a.d.ts"
|
||||
]
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
declare var v;
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
|
||||
// @FileName: a.js
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
@internal class C { }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: b.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: b.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
enum E { }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
export = b;
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
class C implements D { }
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
import a = b;
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
interface I { }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
|
||||
// @FileName: a.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: b.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @declaration: true
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
module M { }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
function F(p?) { }
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
class C { v }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
class C {
|
||||
public foo() {
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
class C { constructor(public x) { }}
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
// @target: es6
|
||||
// @out: b.js
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
function F(): number { }
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
|
||||
// @FileName: a.js
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
/**
|
||||
* @type {number}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
type a = b;
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
Foo<number>();
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
var v = <string>undefined;
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
function F(a: number) { }
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
class C<T> { }
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
function F<T>() { }
|
||||
@ -1,3 +1,3 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.js
|
||||
var v: () => number;
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js,map
|
||||
// @allowJs: true
|
||||
// @sourcemap: true
|
||||
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js,map
|
||||
// @allowJs: true
|
||||
// @inlineSourceMap: true
|
||||
|
||||
// @filename: a.ts
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js,map
|
||||
// @allowJs: true,map
|
||||
// @sourcemap: true
|
||||
// @outdir: out
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: out.js
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @out: tests/cases/compiler/b.js
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @filename: a.ts
|
||||
class c {
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @BaselineFile: compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @Filename: b.js
|
||||
// @emitThisFile: true
|
||||
////function foo() { } // This has error because js file cannot be overwritten - emitSkipped should be true
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
// @declaration: true
|
||||
// @out: out.js
|
||||
// @jsExtensions: js
|
||||
// @allowJs: true
|
||||
// @Filename: b.js
|
||||
// @emitThisFile: true
|
||||
////function foo() { return 10; }/*1*/
|
||||
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesNotSpecifiedWithJsExtensions"
|
||||
"project": "DifferentNamesNotSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "DifferentNamesSpecifiedWithJsExtensions"
|
||||
"project": "DifferentNamesSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsSpecifiedWithJsExtensions"
|
||||
"project": "SameNameDTsSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameDTsNotSpecifiedWithJsExtensions"
|
||||
"project": "SameNameDTsNotSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameFilesNotSpecifiedWithJsExtensions"
|
||||
"project": "SameNameFilesNotSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -3,5 +3,5 @@
|
||||
"projectRoot": "tests/cases/projects/jsFileCompilation",
|
||||
"baselineCheck": true,
|
||||
"declaration": true,
|
||||
"project": "SameNameTsSpecifiedWithJsExtensions"
|
||||
"project": "SameNameTsSpecifiedWithAllowJs"
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"out": "test.js",
|
||||
"jsExtensions": [ "js" ]
|
||||
"allowJs": true
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"out": "test.js",
|
||||
"jsExtensions": [ "js" ]
|
||||
"allowJs": true
|
||||
},
|
||||
"files": [ "a.ts", "b.js" ]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
{ "compilerOptions": { "allowJs": true } }
|
||||
@ -1 +0,0 @@
|
||||
{ "compilerOptions": { "jsExtensions": [ "js" ] } }
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"compilerOptions": { "allowJs": true },
|
||||
"files": [ "a.d.ts" ]
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"compilerOptions": { "jsExtensions": [ "js" ] },
|
||||
"files": [ "a.d.ts" ]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
{ "compilerOptions": { "allowJs": true } }
|
||||
@ -1 +0,0 @@
|
||||
{ "compilerOptions": { "jsExtensions": [ "js" ] } }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user