Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface LoginInterface {
- username: string;
- password: string;
- }
- const MyObject = {
- credentials: null as LoginInterface,
- otherInfo: "I'm something not relevant to this question"
- }
- const MyObject: {
- credentials: LoginInterface,
- otherInfo: string
- } = {
- credentials: null,
- otherInfo: "I'm something not relevant to this question"
- };
- const MyObject: { credentials: ?LoginInterface } = {
- credentials: null,
- otherInfo: "I'm something not relevant to this question"
- }
- type MyType = { credentials: ?LoginInterface, otherInfo?: string }
Add Comment
Please, Sign In to add comment