forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
117 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Mixin } from '@ember/-internals/metal'; | ||
|
||
export function contentFor<T>(proxy: ProxyMixin<T>): T | null; | ||
|
||
interface ProxyMixin<T = unknown> { | ||
/** | ||
The object whose properties will be forwarded. | ||
@property content | ||
@type {unknown} | ||
@default null | ||
@public | ||
*/ | ||
content: T | null; | ||
|
||
willDestroy(): void; | ||
|
||
isTruthy: boolean; | ||
|
||
unknownProperty<K extends keyof T>(key: K): T[K] | undefined; | ||
unknownProperty(key: string): unknown; | ||
|
||
setUnknownProperty<K extends keyof T>(key: K, value: T[K]): T[K]; | ||
setUnknownProperty<V>(key: string, value: V): V; | ||
} | ||
declare const ProxyMixin: Mixin; | ||
|
||
export default ProxyMixin; |
6 changes: 5 additions & 1 deletion
6
packages/@ember/-internals/runtime/lib/mixins/action_handler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import { Mixin } from '@ember/-internals/metal'; | ||
|
||
export default class ActionHandler extends Mixin {} | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
interface ActionHandler {} | ||
declare const ActionHandler: Mixin; | ||
|
||
export default ActionHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/@ember/-internals/runtime/lib/mixins/enumerable.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Mixin } from '@ember/-internals/metal'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
interface Enumerable {} | ||
declare const Enumerable: Mixin; | ||
|
||
export default Enumerable; |
8 changes: 8 additions & 0 deletions
8
packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Mixin } from '@ember/-internals/metal'; | ||
import Enumerable from './enumerable'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
interface MutableEnumerable extends Enumerable {} | ||
declare const MutableEnumerable: Mixin; | ||
|
||
export default MutableEnumerable; |
24 changes: 24 additions & 0 deletions
24
packages/@ember/-internals/runtime/lib/mixins/promise_proxy.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Mixin } from '@ember/-internals/metal'; | ||
|
||
interface PromiseProxyMixin<T> { | ||
reason: null; | ||
|
||
readonly isPending: boolean; | ||
|
||
readonly isSettled: boolean; | ||
|
||
isRejected: boolean; | ||
|
||
isFulfilled: boolean; | ||
|
||
promise: Promise<T>; | ||
|
||
then: this['promise']['then']; | ||
|
||
catch: this['promise']['catch']; | ||
|
||
finally: this['promise']['finally']; | ||
} | ||
declare const PromiseProxyMixin: Mixin; | ||
|
||
export default PromiseProxyMixin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/@ember/-internals/runtime/lib/system/object_proxy.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import FrameworkObject from './object'; | ||
import _ProxyMixin from '../mixins/-proxy'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
interface ObjectProxy extends _ProxyMixin {} | ||
declare class ObjectProxy extends FrameworkObject {} | ||
|
||
export default ObjectProxy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters