Skip to content

Commit

Permalink
Merge pull request #849 from emberjs/tsc-in-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored May 6, 2020
2 parents c07e8c6 + 8c61887 commit 88a4f9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/* globals global, requirejs */

import Resolver from '@ember/application/resolver';
import ApplicationInstance from '@ember/application/instance';
import Application from '@ember/application';
import EmberObject from '@ember/object';

import require from 'require';
import require, { has } from 'require';
import Ember from 'ember';

/**
Expand Down Expand Up @@ -91,7 +89,7 @@ export default function (resolver: Resolver) {

exposeRegistryMethodsWithoutDeprecations(container);

if ((requirejs as any).entries['ember-data/setup-container']) {
if (has('ember-data/setup-container')) {
// ember-data is a proper ember-cli addon since 2.3; if no 'import
// 'ember-data'' is present somewhere in the tests, there is also no `DS`
// available on the globalContext and hence ember-data wouldn't be setup
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es2017",
"allowJs": true,
"allowJs": false,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
Expand Down
1 change: 1 addition & 0 deletions types/require.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export default function <T = any>(moduleName: string): T;
export function has<T = any>(moduleName: string): T;

0 comments on commit 88a4f9f

Please sign in to comment.