-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert helpers to .ts and expose their types (#559)
- Loading branch information
Showing
18 changed files
with
176 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
# compiled output | ||
/dist/ | ||
/declarations/ | ||
/tmp/ | ||
|
||
# dependencies | ||
|
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,12 @@ | ||
# The authoritative copies of these live in the monorepo root (because they're | ||
# more useful on github that way), but the build copies them into here so they | ||
# will also appear in published NPM packages. | ||
/README.md | ||
/LICENSE.md | ||
|
||
# compiled output | ||
/dist | ||
/declarations | ||
|
||
# npm/pnpm/yarn pack output | ||
*.tgz |
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
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 @@ | ||
export { buildTask } from './-private/async-arrow-runtime'; |
5 changes: 4 additions & 1 deletion
5
...ber-concurrency/src/helpers/cancel-all.js → ...ber-concurrency/src/helpers/cancel-all.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
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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import type { Task } from '../index'; | ||
|
||
type TaskParams = [task: Task<any, any[]>, ...args: any[]]; | ||
|
||
function taskHelper(positional: TaskParams) { | ||
let [task, ...args] = positional; | ||
|
||
// @ts-expect-errors _curry isn't typed yet | ||
return task._curry(...args); | ||
} | ||
|
||
export default helper(taskHelper); |
15 changes: 15 additions & 0 deletions
15
packages/ember-concurrency/unpublished-development-types/index.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,15 @@ | ||
// Add any types here that you need for local development only. | ||
// These will *not* be published as part of your addon, so be careful that your published code does not rely on them! | ||
import 'ember-source/types'; | ||
import 'ember-source/types/preview'; | ||
import '@glint/environment-ember-loose'; | ||
import '@glint/environment-ember-template-imports'; | ||
|
||
declare module '@glint/environment-ember-loose/registry' { | ||
// Remove this once entries have been added! 👇 | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export default interface Registry { | ||
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates) | ||
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons | ||
} | ||
} |
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
Oops, something went wrong.