-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi there, I have some trouble using this library in my project. This was working in firelordjs@<=2.4, don't know if it works in firelordjs@>=2.5, didn't check yet
- Version?
2.4.15 - What is the Meta Type?
import type { MetaTypeCreator } from 'firelord';
type SomeObject = {
key: string;
};
type FirestoreDummyData = {
string: string; // ok
array: string[]; // ok
number: number; // ok
regular_object: {
test: string;
}; // ok
mapped_primitive: Record<string, string>; // becomes undefined
mapped_object: Record<string, SomeObject>; // becomes undefined too
};
export type DummyMetaType = MetaTypeCreator<FirestoreDummyData, 'Dummy'>;
const test: DummyMetaType['read'] = {
string: 'test', // ok
array: ['test'], // ok
number: 10, // ok
regular_object: { test: 'test' }, // ok
mapped_primitive: { // TS2322: Type '{ test: string; }' is not assignable to type 'undefined'.
test: 'test',
},
mapped_object: { // TS2322: Type '{ test: { key: string; }; }' is not assignable to type 'undefined'.
test: {
key: 'test',
},
},
};- What operations are you trying to run?
I'm trying to use mapped object in meta type - What do you expect?
Mapped type should work as intended - What is actually happening?
Mapped type becomes undefined in resultedMetaType['read']
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request