Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
780 changes: 553 additions & 227 deletions packages/@ember/-internals/glimmer/lib/renderer.ts

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions packages/@ember/-internals/glimmer/lib/renderer/strict-resolver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import type {
InternalComponentManager,
Nullable,
ResolvedComponentDefinition,
} from '@glimmer/interfaces';
import { BUILTIN_HELPERS, BUILTIN_KEYWORD_HELPERS } from '../resolver';

///////////

/**
* Resolution for non built ins is now handled by the vm as we are using strict mode
*/
export class StrictResolver {
lookupHelper(name: string, _owner: object): Nullable<object> {
return BUILTIN_HELPERS[name] ?? null;
}

lookupBuiltInHelper(name: string): Nullable<object> {
return BUILTIN_KEYWORD_HELPERS[name] ?? null;
}

lookupModifier(_name: string, _owner: object): Nullable<object> {
return null;
}

lookupComponent(
_name: string,
_owner: object
): Nullable<
ResolvedComponentDefinition<object, unknown, InternalComponentManager<unknown, object>>
> {
return null;
}

lookupBuiltInModifier(_name: string): Nullable<object> {
return null;
}
}
4 changes: 2 additions & 2 deletions packages/@ember/-internals/glimmer/lib/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function lookupComponentPair(owner: InternalOwner, name: string): Nullable<Looku
}
}

const BUILTIN_KEYWORD_HELPERS: Record<string, object> = {
export const BUILTIN_KEYWORD_HELPERS: Record<string, object> = {
mut,
readonly,
unbound,
Expand All @@ -101,7 +101,7 @@ const BUILTIN_KEYWORD_HELPERS: Record<string, object> = {
'-in-el-null': inElementNullCheckHelper,
};

const BUILTIN_HELPERS: Record<string, object> = {
export const BUILTIN_HELPERS: Record<string, object> = {
...BUILTIN_KEYWORD_HELPERS,
array,
concat,
Expand Down
Loading
Loading