Skip to content

Commit

Permalink
test no change
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jun 12, 2024
1 parent 66d1b57 commit fe9ea3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/@glimmer/validator/lib/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Indexable } from './utils';

import { debug } from './debug';
import { unwrap } from './utils';
import { createUpdatableTag, DIRTY_TAG } from './validators';
import { createUpdatableTag, DIRTY_TAG, MonomorphicTagImpl } from "./validators";

function isObjectLike<T>(u: T): u is Indexable & T {
return (typeof u === 'object' && u !== null) || typeof u === 'function';
Expand Down Expand Up @@ -65,8 +65,8 @@ export function tagFor<T extends object>(
if (tag === undefined) {
tag = createUpdatableTag();
tags.set(key, tag);
tag.propertyKey = key;
tag.object = obj;
// tag.propertyKey = key;
// tag.object = obj;
}

return tag;
Expand All @@ -75,6 +75,6 @@ export function tagFor<T extends object>(
export function infoForTag(tag: Tag) {
return {
object: tag.object,
propertyKey: tag.propertyKey,
propertyKey: tag.propertyKey,
};
}
4 changes: 2 additions & 2 deletions packages/@glimmer/validator/lib/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export class MonomorphicTagImpl<T extends MonomorphicTagId = MonomorphicTagId> {
public subtag: Tag | Tag[] | null = null;
private subtagBufferCache: Revision | null = null;

public propertyKey: string | null = null;
public object: any = null;
// public propertyKey: any = null;
// public object: any = null;

[TYPE]: T;

Expand Down
2 changes: 2 additions & 0 deletions packages/@glimmer/validator/test/meta-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module('@glimmer/validator: meta', () => {
test('it can provide the object and property for the tag given object', (assert) => {
let obj = {};
let tag = tagFor(obj, 'foo');
tag.object = obj;
tag.propertyKey = 'foo';

let info = infoForTag(tag)!;
assert.strictEqual(info.object, obj);
Expand Down

0 comments on commit fe9ea3e

Please sign in to comment.