I have the following code:
interface Foo {
readonly name: string;
};
const FOO_1: Foo = {
name: 'zing'
};
const FOO_2: Foo = {
name: 'baz'
};
Is there a way to retrieve all implementations of Foo
such that I can filter by name, without storing the constants in a separate list? For example, I want to get all implementations of Foo
with name zing
. This would return FOO_1
.