You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ts-nodesupportgit:(main)catsimple.tstypeUser={name: string;age: number;};functionisAdult(user: User): boolean{returnuser.age>=18;}// Unlike type assertions (`as`), `satisfies` does not change the type of the object but // ensures it meets the requirements of the specified type.constjustine={name: 'Justine',age: 23,}satisfiesUser;constisJustineAnAdult=isAdult(justine);console.log(isJustineAnAdult);➜ts-nodesupportgit:(main)✗npmstartsimple.ts>nodesupport@1.0.0start>node--experimental-transform-types--no-warningssimple.tstrue