Пікірлер
@kvelez
@kvelez 2 ай бұрын
interface IEmployee { readonly id: number; username: string; email: string; address: string; phone: string; birthDate?: Date; verifyPassword(password: string): boolean; } class Employee implements IEmployee { constructor( public readonly id: number, private _username: string, private _password: string, private _email: string, private _address: string, private _phone: string, private _birthDate?: Date ) {} get username(): string { return this._username; } set username(value: string) { this._username = value; } get email(): string { return this._email; } set email(value: string) { this._email = value; } get address(): string { return this._address; } set address(value: string) { this._address = value; } get phone(): string { return this._phone; } set phone(value: string) { this._phone = value; } get birthDate(): Date | undefined { return this._birthDate; } set birthDate(value: Date | undefined) { this._birthDate = value; } // Password should only have a setter, not a getter for security reasons set password(value: string) { this._password = value; } // Method to verify password verifyPassword(password: string): boolean { return this._password === password; } }
@kvelez
@kvelez 2 ай бұрын
interface IItem { readonly id: number; name: string; price: number; } class Item implements IItem { constructor( public readonly id: number, public name: string, public price: number ) {} } interface IShoppingCart { items: Item[]; addItem(item: Item): void; removeItem(item: Item): void; } class ShoppingCart implements IShoppingCart { items: Item[] = []; addItem(item: Item): void { this.items.push(item); } removeItem(item: Item): void { const index = this.items.findIndex(i => i.id === item.id); if (index !== -1) { this.items.splice(index, 1); } } } interface IUser { id: number; name: string; email: string; address: string; phone: string; birthDate?: Date; shoppingCart: IShoppingCart; pay(): void; reimburse(itemId: number): void; } class User implements IUser { public shoppingCart: IShoppingCart; constructor( public id: number, public name: string, public email: string, public address: string, public phone: string, public birthDate?: Date, private accountBalance: number = 0 ) { this.shoppingCart = new ShoppingCart(); } pay(): void { const total = this.shoppingCart.items.reduce((sum, item) => sum + item.price, 0); if (total > this.accountBalance) { console.log('Insufficient funds'); } else { this.accountBalance -= total; this.shoppingCart.items = []; // Clear the cart after successful payment } } reimburse(itemId: number): void { const item = this.shoppingCart.items.find((i) => i.id === itemId); if (item) { this.accountBalance += item.price; this.shoppingCart.removeItem(item); console.log(`Reimbursed ${item.price} for item ${itemId}`); } else { console.log('Item not found in shopping cart'); } } }
@kvelez
@kvelez 2 ай бұрын
tsconfig.json: { "compilerOptions": { "target": "ESNext", "module": "commonjs", "strict": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "rootDir": "./src", "outDir": "./dist", "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, "include": [ "src/**/*.ts" // Specify the path to your TypeScript source files ], "exclude": [ "node_modules" // Exclude the node_modules folder from compilation ] }
@kvelez
@kvelez 2 ай бұрын
const getRaise = new Promise((resolve, reject) => { const gotRaise = true setTimeout(() => { if (gotRaise) { resolve("gotRaise") } else { reject("noRaise") } }, 1000) }) getRaise .then((value) => { console.log(value) })
@kvelez
@kvelez 2 ай бұрын
const sum = (...args: number[]): number => { return args.sort((a, b) => a - b).reduce((a, b) => a + b, 0); } console.log(sum(1, 2, 3, 4, 5));
@kvelez
@kvelez 2 ай бұрын
greeting: export const greet = (): void => console.log("Hello, World!"); index: import { greet } from "./greeting"; greet();
@kvelez
@kvelez 2 ай бұрын
const squared = (num: number) : number => { console.log(Math.pow(num, 2)); return Math.pow(num, 2); } squared(2);
@kvelez
@kvelez 2 ай бұрын
let firstName: string = "Kevin"; console.log(`Hello ${firstName}!`); let a: number = 10; let b: number = 20; let c: number = a + b; console.log(`${a} + ${b} = ${c}`); const greeting = (name: string): string => { return `Hello I'm ${name}`; }
@kvelez
@kvelez 2 ай бұрын
Thanks, great.
@vinylducky
@vinylducky 3 ай бұрын
good short and to the point
@lbineau
@lbineau 4 ай бұрын
Content is cool, but not the AI voice unfortunatly.
@phatcap45
@phatcap45 5 ай бұрын
this would be way cooler with a human voice actually explaining it
@akrammekbal8936
@akrammekbal8936 5 ай бұрын
best channel ever thank You !!!!!!!!!!!!!!!!!!!!!!!!!!!
@SL_Edits143
@SL_Edits143 6 ай бұрын
Thank you soo much
@RobertoEspinoza-q7l
@RobertoEspinoza-q7l 8 ай бұрын
This course is too good!
@phuocle900
@phuocle900 8 ай бұрын
you are my god
@KolyaKovt
@KolyaKovt 8 ай бұрын
how can I add a loader for the lazily loaded components?
@сергейбогданов-щ2с
@сергейбогданов-щ2с 9 ай бұрын
best material on KZbin
@abdulkareemalabi
@abdulkareemalabi 9 ай бұрын
❤ I love koder hq they made learning very easy ❤
@whatisamodel8252
@whatisamodel8252 9 ай бұрын
Who knew itd be an AI TTS voice that could actually convey this clearly.
@SigmundJaehn
@SigmundJaehn 9 ай бұрын
Can’t handle the AI voice. Sorry.
@DatDat59
@DatDat59 9 ай бұрын
You don’t need to use props.firstname in the template, you can use directly firstname
@caaltz
@caaltz 9 ай бұрын
great content, and real world stuff we can actually use
@caaltz
@caaltz 9 ай бұрын
Great and unique content, never see people teaching this in vue
@MauroSSosa
@MauroSSosa 10 ай бұрын
How can I maintain the structure using asyncComputed by vue-async-computed lib in vue3 with OptionsApi? asyncComputed: { items: { async get() { return await fetch(...); }, default: [], },
@goffyfoot82
@goffyfoot82 11 ай бұрын
I would like to be the first to leave a comment and say Thank you. Good information and direction. Here and your site 's info is easily digested. Glad I found your site as the videos are a bonus, I like reading as much as videos. Each one helps sharpen different things that are needed. Peace ...
@prashantkharade3721
@prashantkharade3721 11 ай бұрын
Thanks for guide. This is the best video for state management in svelte on KZbin. It gives me more clearance than documentation.
@ms.crawford1335
@ms.crawford1335 11 ай бұрын
Amazing
@s1nistr433
@s1nistr433 Жыл бұрын
This literally does not work, the fetch query doesn't run and nothing happens
@bohdanbilous1144
@bohdanbilous1144 Жыл бұрын
What does this have to do with vue 3? This is vue 2
@rborowski
@rborowski Жыл бұрын
9:26 - there is a mistake in request body. You should assign properties of postData object, but you wrote "this.userId" instead of "this.postData.userId"
@kienvan1006
@kienvan1006 Жыл бұрын
can we update that file .json just by vuejs?
@vinylducky
@vinylducky 3 ай бұрын
no
@MohammedFalih-m3s
@MohammedFalih-m3s Жыл бұрын
that is helpful thank you
@jdhurrell
@jdhurrell Жыл бұрын
I do not have a problem with the AI voice. While it's not as personal, I find it's easier to concentrate on the content when I can ignore the voice. Keep up the amazing work.
@andreubiosca190
@andreubiosca190 Жыл бұрын
Thx u very much for this excellent videos. Loving Svelte! ❤
@sachinkmohan
@sachinkmohan Жыл бұрын
Keep going! :)
@casmironyeka1104
@casmironyeka1104 Жыл бұрын
I just kicked off from your website now. I love the scheme of work already and I'm sure that with you guys I'll have a smooth ride with Vue 3.
@m.v_f.s
@m.v_f.s Жыл бұрын
This is a great video, actually explain what each of the parts are, which is something where the VueJS documentation fails completely.
@patilrahul515
@patilrahul515 Жыл бұрын
Good....
@davidcotto8955
@davidcotto8955 Жыл бұрын
excellent tutorial!
@Asia_Bangladesh
@Asia_Bangladesh Жыл бұрын
Simple to understand from your video thanks.
@xondamirG
@xondamirG Жыл бұрын
Bro you're incredible. Kudos to you!
@hakan_temur
@hakan_temur Жыл бұрын
Thanks for the tutorial. It's very basic and clear.
@WashimBari-e2z
@WashimBari-e2z Жыл бұрын
thank you
@weldonkipsang3332
@weldonkipsang3332 Жыл бұрын
THIS HAS MADE MY PROPS LEARNING SIMPLE
@some_body_qtyeeuy
@some_body_qtyeeuy Жыл бұрын
Cool
@andrewc3942
@andrewc3942 Жыл бұрын
option api != Composition API
@chameleonnn
@chameleonnn Жыл бұрын
this is vue 2 not composition API
@diggerpy
@diggerpy 2 ай бұрын
it says it right there. options api
@devandsleep
@devandsleep Жыл бұрын
The best video about firebase! Thanks a lot!
@ericgiant3821
@ericgiant3821 Жыл бұрын
Most clear, quick and usefull tutorial I have ever found. would recommend