Skip to content

Commit 027527e

Browse files
committed
[BUGFIX LTS] Backport more types fixes
- Missing `visit` API (used by `@ember/test-helpers`) - Missing dependency on `@simple-dom/interface` for `SimpleElement`
1 parent 57f10fc commit 027527e

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@babel/helper-module-imports": "^7.16.7",
5959
"@babel/plugin-transform-block-scoping": "^7.20.5",
6060
"@ember/edition-utils": "^1.2.0",
61+
"@simple-dom/interface": "^1.4.0",
6162
"@glimmer/vm-babel-plugins": "0.84.2",
6263
"babel-plugin-debug-macros": "^0.3.4",
6364
"babel-plugin-filter-imports": "^4.0.0",

types/preview/@ember/application/index.d.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
declare module '@ember/application' {
22
import Engine from '@ember/engine';
3-
import ApplicationInstance from '@ember/application/instance';
3+
import ApplicationInstance, { BootOptions } from '@ember/application/instance';
44
import EventDispatcher from '@ember/application/-private/event-dispatcher';
55
import { EventDispatcherEvents } from '@ember/application/types';
66
import Router from '@ember/routing/router';
77
import Registry from '@ember/application/-private/registry';
88
import { AnyFn } from 'ember/-private/type-utils';
9-
import Owner, { Resolver } from '@ember/owner';
10-
import type GlimmerComponent from '@glimmer/component';
11-
import EmberObject from '@ember/object';
9+
import Owner from '@ember/owner';
1210

1311
// Shut off default exporting; we don't want anything but the *intended*
1412
// public API present.
@@ -82,10 +80,6 @@ declare module '@ember/application' {
8280
* The Ember.EventDispatcher responsible for delegating events to this application's views.
8381
*/
8482
eventDispatcher: EventDispatcher;
85-
/**
86-
* Set this to provide an alternate class to `DefaultResolver`
87-
*/
88-
resolver: Resolver | null;
8983
/**
9084
* The root DOM element of the Application. This can be specified as an
9185
* element or a jQuery-compatible selector string.
@@ -114,6 +108,8 @@ declare module '@ember/application' {
114108
* Create an ApplicationInstance for this Application.
115109
*/
116110
buildInstance(options?: object): ApplicationInstance;
111+
112+
visit(url: string, options: BootOptions): Promise<ApplicationInstance>;
117113
}
118114

119115
/**

types/preview/@ember/application/instance.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
declare module '@ember/application/instance' {
22
import EngineInstance from '@ember/engine/instance';
3+
import { SimpleElement } from '@simple-dom/interface';
4+
5+
export interface BootOptions {
6+
isBrowser?: boolean;
7+
shouldRender?: boolean;
8+
document?: Document | null;
9+
rootElement?: string | Element | SimpleElement | null;
10+
location?: string | null;
11+
// Private?
12+
isInteractive?: boolean;
13+
_renderMode?: string;
14+
}
315

416
/**
517
* The `ApplicationInstance` encapsulates all of the stateful aspects of a

0 commit comments

Comments
 (0)