([name, attr]: [ string, DataAttrDef<string, boolean, boolean>, ])
| 259 | | InstantAPISchemaPushRemoveDataTypeStep; |
| 260 | |
| 261 | function attrDefToCodeString([name, attr]: [ |
| 262 | string, |
| 263 | DataAttrDef<string, boolean, boolean>, |
| 264 | ]) { |
| 265 | const type = |
| 266 | (attr.metadata.derivedType as any)?.type || attr.valueType || 'any'; |
| 267 | const unique = attr.config.unique ? '.unique()' : ''; |
| 268 | const index = attr.config.indexed ? '.indexed()' : ''; |
| 269 | const required = attr.required ? '' : '.optional()'; |
| 270 | return `${formatKey(name)}: i.${type}()${unique}${index}${required}`; |
| 271 | } |
| 272 | |
| 273 | function entityDefToCodeStr( |
| 274 | name: string, |
nothing calls this directly
no test coverage detected