Commit Graph

203 Commits

Author SHA1 Message Date
Jack Bates
2132d32e3c
Use wildcards for scope path mappings (#47089) 2020-09-25 16:07:58 -07:00
Krystan HuffMenne
22457a0b6a
[ember__debug] Fix args in registerWarnHandler (#46112) 2020-07-17 17:57:08 -07:00
Chris Krycho
ab3081189d
Update Ember and Ember Data TS version to 3.7 (#45162)
* Ember: set TS version to 3.7, Ember version to 3.12

* Ember Data: set TS version to 3.7, Ember Data version to 3.12

* Ember: bump *all* Ember-related types to require 3.7

Bumping the core types has a ripple effect, such that *every* type in
the broader ecosystem which relies on them must *also* be updated. This
includes older versions specified by `typesVersions`, which *implicitly*
use the newer versions from the `@ember/*` and `@ember-data/*` types,
because of declaration merging.

* Ember, Ember Data: override npm-naming

Ember and Ember Data's packages describe their *build-time* behavior,
not their *run-time* behavior, so the TSLint rule doesn't apply.

* Ember: set correct baseUrl in tsconfig for namespace package

* Ember, Ember Data: target current LTS (3.16) version
2020-06-10 12:44:46 -04:00
Wesley Wigham
6970a8fffa
#no-publishing-comment No more tabs in json documents, trailing newlines for every document 2020-05-15 12:27:10 -07:00
Andrey Mikhaylov (lolmaus)
0217139d1e
[ember__array] Fix compact, firstObject and lastObject (#44155)
Fixes https://github.com/typed-ember/ember-cli-typescript/issues/1145

 Listing C:\Code\DefinitelyTyped\
 New files added to this directory will not be compressed.

      136 :       136 = 1.0 to 1   .editorconfig
      231 :       231 = 1.0 to 1   .gitattributes
        0 :         0 = 1.0 to 1   .github
      555 :       555 = 1.0 to 1   .gitignore
        0 :         0 = 1.0 to 1   .history
       18 :        18 = 1.0 to 1   .npmrc
        7 :         7 = 1.0 to 1   .prettierignore
      183 :       183 = 1.0 to 1   .prettierrc.json
      189 :       189 = 1.0 to 1   .travis.yml
      527 :       527 = 1.0 to 1   azure-pipelines.yml
        0 :         0 = 1.0 to 1   docs
     1167 :      1167 = 1.0 to 1   LICENSE
        0 :         0 = 1.0 to 1   node_modules
   208269 :    208269 = 1.0 to 1   notNeededPackages.json
     1179 :      1179 = 1.0 to 1   package.json
    31018 :     31018 = 1.0 to 1   README.cn.md
    22729 :     22729 = 1.0 to 1   README.es.md
    32813 :     32813 = 1.0 to 1   README.ko.md
    34615 :     34615 = 1.0 to 1   README.md
    38698 :     38698 = 1.0 to 1   README.ru.md
        0 :         0 = 1.0 to 1   scripts
        0 :         0 = 1.0 to 1   types
   179466 :    179466 = 1.0 to 1   yarn.lock

Of 24 files within 1 directories
0 are compressed and 24 are not compressed.
551,800 total bytes of data are stored in 551,800 bytes.
The compression ratio is 1.0 to 1.
2020-05-12 13:01:33 -07:00
Nathan Shively-Sanders
9e4968cf95
Fix ember tests for TS 3.9 (#44159)
TS 3.9 now forbids deleting properties that aren't optional or undefined. This
exposed a bug in ember tests where the tests were deleting a property
with the type `{} | null`. I changed the type to `{} | undefined` to
reflect what will actually happen at runtime.
2020-04-26 13:09:27 -04:00
James C. Davis
687d92d01f
Ensure all members of the typed-ember team are authors on ember* type defs (#43429)
* chore: add @jamescdavis and @dfreeman to ember

* chore: add @jamescdavis and @dfreeman to ember-data

* chore: add @dfreeman, @chriskrycho, @jamescdavis to ember-feature-flags

* chore: add @dfreeman, @chriskrycho, @jamescdavis to ember-mocha

* chore: add @dfreeman, @chriskrycho, @jamescdavis to ember-modal-dialog

* chore: add @chriskrycho and @jamescdavis to ember-qunit

* chore: add @chriskrycho and @jamescdavis to ember-resolver

* chore: add @dfreeman, @chriskrycho, @jamescdavis to ember-test-helpers

* chore: add @dfreeman, @jamescdavis, @mike-north to ember-testing-helpers

* chore: update github url for @chriskrycho

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__application

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__array

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__component

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__controller

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__debug

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__engine

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__error

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__object

* chore: add @mike-north, @dfreeman, @jamescdavis to ember__ordered-set

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__polyfills

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__runloop

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__service

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__string

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__template

* chore: add @chriskrycho to ember__test-helpers

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__test

* chore: add @chriskrycho, @dfreeman, @jamescdavis to ember__utils
2020-03-28 11:50:24 -07:00
Gabriela Araujo Britto
e980ea529f
Update tslint configs (#42555)
* Update tslint configs

* Update npm-naming configs

* Fix some configs

#no-publishing-comment
2020-02-24 16:06:03 -08:00
Erik Krogh Kristensen
5d1074409c Fixing confusion with the new and constructor keywords. (#38997)
* remove non-existing constructor method from Array in Ember

* removed method named "new" and added a constructor to the Collaborator class in google-drive-realtime

* made LocalizedObservable into the class that it actually is in Knockout

* removed a method named "constructor" and replaced it with a constructor in microsoft-ajax

* removed a method called "new" and replaced it with a constructor in microsoft-ajax

* autoformat

* made QueryCursor into the class it actually is in mongoose

* made Connection into a class

* made QueryStream and QueryCursor into a classes

* removed two methods called "new" and replaced them with constructors

* change EventSubscriptionVendor into a class

* removed class only used internally Route (it had a wrongly declared method named "constructor")

* removed non-existing method named "constructor" in rx-angular

* made StackFrame into a class

* made StreamMeter into a class

* removed a method named "new" and replaced it with a constructor
2019-10-15 10:07:05 -07:00
Scott Kidder
4131598ed6 [@types/ember] add ember__template (#38571)
* [@types/ember] add ember__template

* [@types/ember] move -private/handlebars into @ember/template

* [@types/ember] fix SafeString namespacing

Co-Authored-By: Mike North <michael.l.north@gmail.com>
2019-10-03 14:22:21 -07:00
Nathan Shively-Sanders
0f8f845462
Update tests for Typescript 3.7 (#38672)
Typescript 3.7 includes a flag that will allow people to migrate to the
Class Fields ECMA proposal as currently specified, which is at Stage 3.
When `--useDefineForClassFields` is turned on, Typescript
issues 3 new errors in places where the current Typescript semantics
would cause errors with the Stage 3 spec.

Two of the errors are very rare. The third shows up whenever classes want
to redeclare the type of a property from a superclass, usually when the
base property's type is `any` or `unknown`.

```ts
class ColumnSizerExample extends React.Component<any, any> {
  context: React.ContextType<typeof MyContext>
}
```

Without `--useDefineForClassFields`, this *only* redeclares the type of
`context`. With `--useDefineForClassFields`, it redeclares the type of
`context` **and** initialises it to `undefined`. This is very surprising.

To avoid this, Typescript 3.7 introduces new syntax for exactly this scenario:

```ts
class ColumnSizerExample extends React.Component<any, any> {
  declare context: React.ContextType<typeof MyContext>
}
```

However, Definitely Typed tests cannot use this new syntax because it
only works with Typescript 3.7, which isn't even in beta until next
week. So this PR uses several other workarounds instead:

1. Moving a constructor initialiser to a property declaration initialiser.
2. Using a dummy initialiser:
3. Adding type annotations so the type of the base property can be correctly inferred.
4. Deleting the declaration when it has the same type as the base. In this case it's redundant.
2019-09-27 13:01:36 -07:00
Nathan Shively-Sanders
6115ac10be
Add new npm-naming exemptions (#36969)
* Add new npm-naming exemptions

These packages fail the upcoming requirement that the types package
version match a version that exists for the original package.

In other words, these packages have a version, like 0.0 or 1.0, that
their original package doesn't have. The "npm-naming" lint rule will
soon prevent this, so these packages need to be exempt from this rule.

* Restore some useful comments/formatting

* Update required TS version for stale packages
2019-07-17 14:06:12 -07:00
Anders Hejlsberg
fa812c285d
Update Ember tests to treat 'string & number' and 'never' the same (#36095)
* Update tests to treat 'string & number' and 'never' the same

* Remove $ExpectType since both 'string & number' or 'never' are ok
2019-06-11 09:32:01 -07:00
Chris Krycho
4b5714e8e9
[@ember/routing] Fix Ember.inject.controller tests. 2019-04-03 08:13:24 -06:00
Wesley Wigham
4d0a8f38cf
Change libaries to rely less on implicit {} in test output (#34336) 2019-03-29 15:28:15 -07:00
Mike North
59c441bc45 [ember] ember-octane decorator types (#33963)
* [@ember/object] types for @action and @computed decorators

* [@ember/service] add support for ember-octane @inject decorator

* [@ember/object] absolute import in tests

* [@ember/controller] controller @inject decorator for ember-octane

* [ember] lint fixes

* [@ember/object] decorators for computed property macros in ember-octane
2019-03-18 08:44:39 -07:00
Nathan Shively-Sanders
ee101ed5b1
Merge pull request #33520 from mike-north/ember-assign
[ember] Remove improperly-deprecated Ember.assign
2019-03-07 16:23:49 -08:00
Nathan Shively-Sanders
032dbdcc08
Merge pull request #33522 from mike-north/fix-deprecate
[@types/ember] Add url property to deprecation options
2019-03-07 16:22:53 -08:00
Nathan Shively-Sanders
a205830fc9 Nightly cleanup 06-03-2019
1. Add handlebars depdencies missed in #33518, which deprecated
@types/handlebars now that handlebars ships its own types.
2. Add project homepage for kafkajs.
2019-03-06 09:53:22 -08:00
Mike North
3bf06f2894 [ember/v2] add limited handlebars types to old ember types 2019-03-01 12:31:23 -08:00
simonihmig
e065fec390 Add url property to deprecation options
See 56d60eac53/packages/%40ember/debug/lib/deprecate.ts (L16)
2019-03-01 12:08:26 -08:00
Mike North
9ecdc820da [ember/v2] add limited handlebars types to old ember types 2019-03-01 12:00:16 -08:00
Mike North
4245ec9106 [ember/v2] remove dependency on handlebars types 2019-03-01 11:57:56 -08:00
simonihmig
465aea12e4 [ember] Fix wrongly deprecated Ember.assign 2019-03-01 11:49:32 -08:00
Mike North
112076b653 [ember] remove dependency on handlebars types 2019-03-01 11:42:23 -08:00
Mike North
88c4302be4 Merge branch 'master' of github.com:DefinitelyTyped/DefinitelyTyped into handlebars-updates 2019-03-01 09:59:00 -08:00
Nathan Shively-Sanders
84d936db3f Ember workarounds and fixes for TS 3.4
1. Ember-data tests had the wrong return type in a couple of places. TS
3.4 catches this error, and this PR fixes it.
2. Ember-data's Model class became invariant in 3.4 because of its use of the
`this` type.  This PR uses a `this` parameter with a method-local type
parameter to avoid using Model's `this` type.
3. Ember v2's tests were broken by TS 3.4's more complete return-type
inference, which caused a variable declaration's type annotation to
break inference through contextual typing. This PR converts the type
annotation to type parameters on the call, which short-circuits
inference entirely. It's also shorter.
2019-02-26 14:38:40 -08:00
Nils Knappmeier
92ea4066e2 [@types/handlebars]: Remove package, types are now integrated in handlebars 2019-02-19 16:31:03 +01:00
Nathan Shively-Sanders
f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00
Mike North
fee22b212b fix: add @ember/object notifyPropertyChange 2018-12-12 13:08:54 -08:00
Nathan Shively-Sanders
3278a1163b
Merge pull request #30677 from DefinitelyTyped/fix-mali-dependents
Fix mali dependents
2018-11-20 10:13:20 -08:00
Nathan Shively-Sanders
afd53b56cc Fix unrelated lints 2018-11-20 09:12:00 -08:00
Ruslan Hrabovyi
7aef9be4cd [@ember/routing] Fix redirect hook
Prior to this commit `redirect()` hook was mistakenly
typed and documented the same way as `refresh()`.

It's now fixed for v2 and v3 now.

While v3 is provided with a positive and a negative test
cases, v2 is only provided with a positive one.

This is because v2 uses typescript of version 2.4 which is
not able to catch the failing test case.
2018-11-14 01:12:46 +02:00
Andy
537a12f8aa
Assorted tsconfig fixes (#29760)
* Assorted tsconfig fixes

* Undo ember__object changes
2018-10-15 16:17:32 -07:00
Christian
2b651d9c4f fix(ember__error): make EmberError extendable (#29337) 2018-10-01 21:02:28 -07:00
Mike North
8d2d24c520
[ember] remove unused types 2018-09-26 21:52:40 -07:00
Mike North
0bea293eae
[ember] remove deprecated and private types
Fixes https://github.com/typed-ember/ember-cli-typescript/issues/315
2018-09-25 16:16:20 -07:00
Mike North
0f5eab6afa [ember] enable lint rules 2018-09-24 20:09:30 -07:00
Mike North
8e5ac6dc85 [ember] fix code indent 2018-09-24 20:09:25 -07:00
Mike North
9797ae0d95 [ember] Unwrap declare 'ember' 2018-09-24 20:09:17 -07:00
Mike North
479132fc56 [ember] @ember/service as source of types, ember as re-export 2018-09-24 18:50:15 -07:00
Mike North
20d6cdb189 Merge branch 'master' of github.com:DefinitelyTyped/DefinitelyTyped into ember-runloop 2018-09-24 18:24:16 -07:00
Mike North
961849c7df Merge branch 'master' of github.com:DefinitelyTyped/DefinitelyTyped into ember-runloop 2018-09-24 16:31:02 -07:00
Mike North
3995e0d15e Merge branch 'master' of github.com:DefinitelyTyped/DefinitelyTyped into ember-error 2018-09-24 16:25:55 -07:00
Mike North
466bd2829c [ember] ensure that Ember.run and @ember/runloop variants are equally tested 2018-09-21 23:26:40 -07:00
Mike North
904c936f7b [ember] @ember/test as source of types, ember as re-export 2018-09-21 23:13:47 -07:00
Mike North
b2f4d72470 [ember] @ember/application as source of types, ember as re-export 2018-09-21 19:04:32 -07:00
Mike North
afa85f2af4 [ember] @ember/routing as source of types, ember as re-export 2018-09-21 18:35:26 -07:00
Mike North
ff0bdade31 [ember] @ember/runloop as source of types, ember as re-export 2018-09-21 18:13:08 -07:00
Mike North
4066620479 [ember] @ember/error as source of types, ember as re-export 2018-09-21 18:09:23 -07:00