[ember] refactor @ember/error out into a separate module (#28792)

* [ember] refactor @ember/error out into a seperate module
fixes: https://github.com/typed-ember/ember-cli-typescript/issues/269

* [@ember/error] enable all tslint rules
This commit is contained in:
Mike North
2018-09-14 10:24:01 -07:00
committed by Ryan Cavanaugh
parent 614492e26b
commit 1da1401566
4 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import Error from '@ember/error';
new Error('Fuuuuuuuu'); // $ExpectType Error

10
types/ember__error/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for @ember/error 3.0
// Project: http://emberjs.com/
// Definitions by: Mike North <https://github.com/mike-north>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import Ember from 'ember';
declare const Error: typeof Ember.Error;
export default Error;

View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"paths": {
"@ember/error": ["ember__error"]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ember__error-tests.ts"
]
}

View File

@@ -0,0 +1,5 @@
{
"extends": "dtslint/dt.json",
"rules": {
}
}