-
-
Notifications
You must be signed in to change notification settings - Fork 27
Add Angular framework adapter to core #104
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
Merged
fabian-hiller
merged 4 commits into
open-circle:main
from
sonukapoor:feat/103-angular-core-adapter
May 24, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bc0d6bb
Add Angular framework adapter to core
sonukapoor 28f7d72
Address Copilot review comments
sonukapoor 4f8ae5d
Fix createSignal overload compatibility
sonukapoor 5853918
Remove no-arg createSignal overload and re-export untrack directly
sonukapoor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,52 @@ | ||
| import { signal } from '@angular/core'; | ||
| import type { Signal } from '../types/signal/index.ts'; | ||
| import type { Framework } from './index.ts'; | ||
|
|
||
| export { untracked as untrack } from '@angular/core'; | ||
|
|
||
| /** | ||
| * The current framework being used. | ||
| */ | ||
| export const framework: Framework = 'angular'; | ||
|
|
||
| /** | ||
| * Creates a unique identifier string. | ||
| * | ||
| * @returns The unique identifier. | ||
| */ | ||
| // @__NO_SIDE_EFFECTS__ | ||
| export function createId(): string { | ||
| return Math.random().toString(36).slice(2); | ||
| } | ||
|
|
||
| /** | ||
| * Creates a reactive signal with an initial value. | ||
| * | ||
| * @param initialValue The initial value. | ||
| * | ||
| * @returns The created signal. | ||
| */ | ||
| // @__NO_SIDE_EFFECTS__ | ||
| export function createSignal<T>(initialValue: T): Signal<T> { | ||
| const writableSignal = signal(initialValue); | ||
| return { | ||
| get value() { | ||
| return writableSignal(); | ||
| }, | ||
| set value(nextValue: T) { | ||
| writableSignal.set(nextValue); | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Batches multiple signal updates into a single update cycle. This is a | ||
| * no-op in Angular as batching is handled automatically. | ||
| * | ||
| * @param fn The function to execute. | ||
| * | ||
| * @returns The return value of the function. | ||
| */ | ||
| export function batch<T>(fn: () => T): T { | ||
| return fn(); | ||
| } |
This file contains hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.