Skip to content

Commit

Permalink
Merge pull request #20493 from emberjs/types/more-lts-backports
Browse files Browse the repository at this point in the history
[BUGFIX LTS] Backport more types fixes
  • Loading branch information
chriskrycho committed Jun 30, 2023
2 parents 57f10fc + 027527e commit 5ae2a61
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@babel/helper-module-imports": "^7.16.7",
"@babel/plugin-transform-block-scoping": "^7.20.5",
"@ember/edition-utils": "^1.2.0",
"@simple-dom/interface": "^1.4.0",
"@glimmer/vm-babel-plugins": "0.84.2",
"babel-plugin-debug-macros": "^0.3.4",
"babel-plugin-filter-imports": "^4.0.0",
Expand Down
12 changes: 4 additions & 8 deletions types/preview/@ember/application/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
declare module '@ember/application' {
import Engine from '@ember/engine';
import ApplicationInstance from '@ember/application/instance';
import ApplicationInstance, { BootOptions } from '@ember/application/instance';
import EventDispatcher from '@ember/application/-private/event-dispatcher';
import { EventDispatcherEvents } from '@ember/application/types';
import Router from '@ember/routing/router';
import Registry from '@ember/application/-private/registry';
import { AnyFn } from 'ember/-private/type-utils';
import Owner, { Resolver } from '@ember/owner';
import type GlimmerComponent from '@glimmer/component';
import EmberObject from '@ember/object';
import Owner from '@ember/owner';

// Shut off default exporting; we don't want anything but the *intended*
// public API present.
Expand Down Expand Up @@ -82,10 +80,6 @@ declare module '@ember/application' {
* The Ember.EventDispatcher responsible for delegating events to this application's views.
*/
eventDispatcher: EventDispatcher;
/**
* Set this to provide an alternate class to `DefaultResolver`
*/
resolver: Resolver | null;
/**
* The root DOM element of the Application. This can be specified as an
* element or a jQuery-compatible selector string.
Expand Down Expand Up @@ -114,6 +108,8 @@ declare module '@ember/application' {
* Create an ApplicationInstance for this Application.
*/
buildInstance(options?: object): ApplicationInstance;

visit(url: string, options: BootOptions): Promise<ApplicationInstance>;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions types/preview/@ember/application/instance.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
declare module '@ember/application/instance' {
import EngineInstance from '@ember/engine/instance';
import { SimpleElement } from '@simple-dom/interface';

export interface BootOptions {
isBrowser?: boolean;
shouldRender?: boolean;
document?: Document | null;
rootElement?: string | Element | SimpleElement | null;
location?: string | null;
// Private?
isInteractive?: boolean;
_renderMode?: string;
}

/**
* The `ApplicationInstance` encapsulates all of the stateful aspects of a
Expand Down

0 comments on commit 5ae2a61

Please sign in to comment.