Skip to content

Commit 236b4b7

Browse files
committed
fix(docs): update enum type
Signed-off-by: Diana Lau <dhmlau@ca.ibm.com>
1 parent 68e671a commit 236b4b7

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -434,23 +434,7 @@ startTime: Date;
434434
435435
### Enum
436436
437-
Enums are special. Create an Enum using Enum factory:
438-
439-
```ts
440-
const MOOD = dataSource.EnumFactory('glad', 'sad', 'mad');
441-
MOOD.SAD; // 'sad'
442-
MOOD(2); // 'sad'
443-
MOOD('SAD'); // 'sad'
444-
MOOD('sad'); // 'sad'
445-
446-
export class User extends Entity {
447-
//..
448-
@property({
449-
type: MOOD,
450-
})
451-
mood: MOOD;
452-
}
453-
```
437+
See the [Model ENUM property](https://loopback.io/doc/en/lb4/Model.html#enum-property) for details.
454438
455439
### Default Clause/Constant
456440

0 commit comments

Comments
 (0)