[QUESTION] How to extend Document
See original GitHub issueSummary:
Under the Model documentation (https://dynamoosejs.com/guide/Model) there is an example where the Document class is extended to achieve type checking.
The example from the docs
// Strongly typed model
class Cat extends Document {
id: number;
name: string;
}
const CatModel = dynamoose.model<Cat>("Cat", {"id": Number, "name": String});
This looks like a neat feature, but how do one get a hold of the Document class/type referred to in this example. I can’t find anywhere on the dynamoose import where it’s exposed?
Thank you.
Other:
- I have read through the Dynamoose documentation before posting this issue
- I have searched through the GitHub issues (including closed issues) and pull requests to ensure this question has not already been raised before
- I have searched the internet and Stack Overflow to ensure this question hasn’t been raised or answered before
- I have filled out all fields above
- I am running the latest version of Dynamoose
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How can I extend the document object? - javascript
I updated your fiddle. The problem you were having is that document object is an instance of the HTMLDocument object type.
Read more >About Form 4868, Application for Automatic Extension of Time ...
A U.S. citizen or resident files this form to request an automatic extension of time to file a U.S. individual income tax return....
Read more >Keyboard shortcuts in Word - Microsoft Support
Use your keyboard to navigate your document, ribbon, or menus, ... Alt+W, Q, then use the Tab key in the Zoom dialog box...
Read more >Employment Authorization Extensions - USCIS
Employment Authorization Document (EAD) Renewal. DHS will automatically extend EADs (Form I-766) for employees with certain EAD category ...
Read more >Sample i539 Form Extension, Documents (B1/B2, H4 COS)
Documents for H4 Extension. Common Questions; Sample i-539 form; i-539A Sample; Fee Calculator. USCIS Mailing Address ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jornki just import it like that
Hi @sulemanelahi, here is example