Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Publish stable types for Ember #20449

Merged
merged 105 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
90f78e7
Publish types from source and remove preview types
chriskrycho Apr 19, 2023
06b7acb
Change how loader's `define` becomes visiblte to TS
chriskrycho Dec 23, 2022
22a100b
Add ability to manually copy `.d.ts` type modules
chriskrycho Apr 19, 2023
5da100d
Provide an `owner-ext` for `@ember/service`
chriskrycho Dec 23, 2022
6551040
Import a root without `/index` in `ember-template-compiler`
chriskrycho Dec 23, 2022
e034e72
The router service presently takes a generic
chriskrycho Dec 23, 2022
80b738d
Update how we compile backburner.js' types
chriskrycho Dec 23, 2022
c1f0073
Publishing script: do not wrap passthrough copies
chriskrycho Jan 25, 2023
4e15f8b
Correct the `@ember/application` type test
chriskrycho Jan 25, 2023
edbb768
Do not special-case ember-template-compiler/lib/types
chriskrycho Jan 25, 2023
3917d20
Use `keyof this` in `Observable`'s `get`, `set`, etc.
chriskrycho Jan 25, 2023
3940d67
Emit named items for built-in components
chriskrycho Jan 25, 2023
31cef6f
Correctly handle router registration into service registry
chriskrycho Jan 25, 2023
632cb35
Name the return type of (internal) controllerFor
chriskrycho Jan 25, 2023
6473757
Loosen restriction on service registry
chriskrycho Jan 25, 2023
4408557
Substantially refactor `publish.mjs`
chriskrycho Jan 26, 2023
6e1472e
Fix types and type tests for `@ember/array`
chriskrycho Jan 26, 2023
6dedf8b
Correct `@ember/object` type tests given improved safety
chriskrycho Apr 19, 2023
ee42331
Update `@ember/application` type tests for DI registry
chriskrycho Apr 19, 2023
5d2db7e
Handle type (un)safety of some runloop `bind`
chriskrycho Apr 19, 2023
e596002
Handle `declare namespace` in types publishing script
chriskrycho Apr 19, 2023
2fdb3f5
Refactor `Ember` namespace to be a TS `namespace`
chriskrycho Apr 20, 2023
7e5cc1a
Add top-level safe key list for `getProperties`
chriskrycho Apr 20, 2023
6385cea
Provide a useful type for `@computed.meta()`
chriskrycho Apr 20, 2023
abc0c4e
Extract owner and location side effect modules for routing/location
chriskrycho Apr 20, 2023
d48f51e
Dramatically simplify routing types, fix its type tests
chriskrycho Apr 20, 2023
bdf9fcf
Make cache-for slightly type-safer
chriskrycho Apr 20, 2023
436d583
Update types and tests for Ember namespace
chriskrycho Apr 20, 2023
229eb14
Remove extraneous type parameter from ArrayProxy
chriskrycho Apr 20, 2023
afa3d97
Make the `compare` utility more type safe
chriskrycho Apr 20, 2023
9f293e5
Correctly capture the overload semantics of `warn`
chriskrycho Apr 20, 2023
ccb1afa
Fix type errors (by using simpler types!) for utils
chriskrycho Apr 20, 2023
09f3b36
Fix types and type tests for `@ember/debug/data-adapter`
chriskrycho Apr 20, 2023
cd91172
Update type tests to match RouterService implementation
chriskrycho Apr 24, 2023
5649f39
Fix types and type tests for @ember/debug
chriskrycho Apr 24, 2023
c203349
Improve local types for component-managers
chriskrycho Apr 25, 2023
1d2e048
Fix types for `assert` and `(get|set)DebugFunction`
chriskrycho Apr 25, 2023
23da1ea
Explicitly name an indexed type in router.ts
chriskrycho Apr 25, 2023
284ea81
Set correct types for QUnit test adapter
chriskrycho Apr 25, 2023
c9b410a
Allow `ember-testing`'s `Promise` not to have labels
chriskrycho Apr 25, 2023
fde1a80
Add a required `as const` for Controller QPs type test
chriskrycho Apr 25, 2023
9923c7a
Supply correct internal types for `precompileTemplate`
chriskrycho Apr 25, 2023
0c2058d
Handle edge case in types publishing path mapping
chriskrycho Apr 25, 2023
de0f67a
Update the Ember NS `debug` tests to match modules
chriskrycho Apr 25, 2023
2a1dd3e
Update types and type tests for CP macros
chriskrycho Apr 25, 2023
11f1ecf
Simplify types for `(get|set)Properties`
chriskrycho Apr 25, 2023
5d87525
Account for optionality of `assertDestroyablesDestroyed`
chriskrycho Apr 25, 2023
a2e42e1
Eliminate cycle in definition of (Ember) `Component`
chriskrycho Apr 25, 2023
341e356
Fix/simplify types of `create`, `reopen`, and `reopenClass`
chriskrycho Apr 25, 2023
f70771d
Update engine type tests now that types catch more errors
chriskrycho Apr 25, 2023
284f6db
Remove now-defunct types for `(add|remove)Listener`
chriskrycho Apr 25, 2023
b3af348
Accept re-mappings in Controller QP type definitions
chriskrycho Apr 25, 2023
35251ec
Remove extranes `extends` from `EmberObject` interface
chriskrycho Apr 25, 2023
3b320c0
The type of `objectsAt` is `Array`, not `Ember.Array`
chriskrycho Apr 25, 2023
b94db2c
Handle optionality of `Ember.Test` in type tests
chriskrycho Apr 25, 2023
294e401
Provide type safe get and set in ObjectProxy
chriskrycho Apr 25, 2023
dd37b6c
Use `Owner` correctly in `@ember/object` type tests
chriskrycho Apr 25, 2023
a17d279
Fix `@ember/object` tests for proxy and observable
chriskrycho Apr 25, 2023
6694ed7
Fix bad import and reference in ember NS type tests
chriskrycho Apr 25, 2023
86eeaf7
Partially reimplement type-safe `.create()`
chriskrycho Apr 25, 2023
2fd539a
Correctly export both sides of the opaque LinkTo
chriskrycho Apr 25, 2023
dd907e9
Update a `set()` type test: it allows dynamic setting
chriskrycho Apr 25, 2023
972a9e1
Remove a type test which only covered internals
chriskrycho Apr 25, 2023
ffb0501
Update type tests for improved `set`/`get` inference
chriskrycho Apr 25, 2023
8d80667
Drop `Ember.get` from Ember Router tests
chriskrycho Apr 25, 2023
26f16cb
Further remove generic Route param from router
chriskrycho Apr 25, 2023
caf4b1d
Fix types for internal-test-helpers
chriskrycho Apr 25, 2023
4799725
Finish updating internals for safe-r create
chriskrycho Apr 25, 2023
be2596f
Improve correctness and usability of `@ember/modifier` types
chriskrycho Apr 26, 2023
cb8f6fd
Improve types and type tests for `@ember/test`
chriskrycho Apr 26, 2023
a0ab50f
Fix some missed type tests for `.extend`, `.create`, and `.reopen`
chriskrycho Apr 26, 2023
ad9e569
Correctly handle opaque LinkTo type in type tests
chriskrycho Apr 26, 2023
142d5d1
Fix type test for Ember.Object: correct `Owner`
chriskrycho Apr 26, 2023
06c3a14
Correct type tests for `typeOf` (just `string`)
chriskrycho Apr 26, 2023
40722d2
Add `static positionalParams` type declaration to EmberComponent
chriskrycho Apr 26, 2023
ef18c84
Fix types of ArrayProxy.content
chriskrycho Apr 26, 2023
08296c6
Fix types around component templates and TOCs
chriskrycho Apr 26, 2023
e57bc26
Fix types and type tests for `@ember/test`
chriskrycho Apr 28, 2023
9d65d25
Drop an unused import from Ember type tests
chriskrycho Apr 28, 2023
911e14c
Make Ember's helper types Glint-compatible
chriskrycho Apr 28, 2023
c0f010c
Fix optionality of `owner` arg for `Route` class
chriskrycho Apr 28, 2023
5b397e1
Fix types for template-only components
chriskrycho Apr 28, 2023
40b3a19
Fix re-export of `Ember.RSVP` as a `namespace`
chriskrycho Apr 28, 2023
05acc98
Drop now-unnecessary `types/preview` from type-tests
chriskrycho Apr 28, 2023
2f26a2c
Fix TS lint errors
chriskrycho Apr 28, 2023
73dc0cd
Remove assertion from build-owner internal test helper
chriskrycho May 1, 2023
f55cc15
Fix a missed rename in `ember/index.ts`
chriskrycho May 1, 2023
3f54dc7
Update Ember NS reexport test for backburner.js
chriskrycho May 1, 2023
2f826a3
Add private runloop backburner re-exports
chriskrycho May 1, 2023
544d381
Remove an unnecessary type cast from Router
chriskrycho May 1, 2023
9fd1b03
Fix typo in comment in broccoli/packages.js
chriskrycho May 4, 2023
2287751
Do not duplicate work on hand-written `.d.ts` files
chriskrycho May 4, 2023
4bc5d73
Include signatures in Ember NS re-exports
chriskrycho May 4, 2023
22276b5
Export built-in components as interfaces for Glint
chriskrycho May 4, 2023
b7a7a57
Mark internal `Route` details with `@internal`
chriskrycho May 4, 2023
ae6d85d
Fix typo in description of `Opaque`
chriskrycho May 4, 2023
824a3b6
Fix typo in comment explaining abstract class for helper
chriskrycho May 4, 2023
e572863
Provide default type for Signatures etc. in Ember NS
chriskrycho May 4, 2023
19b31a3
Explicitly type test fallback path for runloop `bind`
chriskrycho May 4, 2023
1038406
Use `import type` in internal components
chriskrycho May 4, 2023
c725cdc
Publicly export `FunctionBasedHelperInstance`
chriskrycho May 5, 2023
f3fa810
Move `@glimmer/*` packages to `dependencies`
chriskrycho May 5, 2023
f0e501d
Move backburner.js and router_js to `dependencies`
chriskrycho May 5, 2023
4827457
Move `route-recognizer` to `dependencies`
chriskrycho May 5, 2023
164920b
Merge remote-tracking branch 'origin/main' into types-from-source
chriskrycho May 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions broccoli/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ module.exports.backburnerES = function _backburnerES() {
return funnelLib('backburner.js', 'dist/es6', {
files: ['backburner.js'],
annotation: 'backburner es',
// This write the "output" to `backburner.js.js` in the funnel, which means
chriskrycho marked this conversation as resolved.
Show resolved Hide resolved
// that when it gets fed into the Babel AMD transform, which (implicitly)
// pulls off the trailing `.js`, the result is just `backburner.js`, which
// is the actual Node-resolve-able (and therefore TS-resolve-able) ES module
// on disk.
getDestinationPath: (relativePath) => relativePath + '.js',
});
};

Expand Down
2 changes: 1 addition & 1 deletion packages/@ember/-internals/glimmer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export { default as Input } from './lib/components/input';
export { default as LinkTo } from './lib/components/link-to';
export { default as Textarea } from './lib/components/textarea';
export { default as Component } from './lib/component';
export { default as Helper, helper } from './lib/helper';
export { default as Helper, helper, type FunctionBasedHelper } from './lib/helper';
export { SafeString, escapeExpression, htmlSafe, isHTMLSafe } from './lib/utils/string';
export { Renderer, _resetRenderers, renderSettled } from './lib/renderer';
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default class CurlyComponentManager
Object.assign(named, args.named.capture());

for (let i = 0; i < count; i++) {
let name = positionalParams[i];
let name: string | undefined = positionalParams[i];
assert('Expected at least one positional param', name);

assert(
Expand Down
Loading