Skip to content

Commit 1b9c15b

Browse files
Merge pull request #2 from devsonket/develop
last update
2 parents 1f9f1c8 + b53f37e commit 1b9c15b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

data/typescript.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,26 @@
279279
"definition": "পারশিয়াল বা আংশিক টাইপ",
280280
"code": "interface Person {\n\tname: string;\n\tage: number;\n\theight: string;\n}\n\nconst person1: Partial<Person> = {\n\tname: 'Hridoy',\n\tage: 28\n}"
281281
}]
282+
},
283+
{
284+
"title": "ইন্টারফেস হ্যাকস ও ট্রিকস",
285+
"items": [{
286+
"definition": "অপশনাল প্রোপার্টি ডিক্লেয়ার করা('?' চিহ্ন দিয়ে) ",
287+
"code": "interface PersonInterface {\n\tname:string;\n\tage:number; \n\tprofession?:string;\n}"
288+
},
289+
{
290+
"definition": "উপরের interface থেকে কোনো object বানাতে গেলে profession প্রোপার্টি ছাড়াই বানানো সম্ভব হবে",
291+
"code": "const person1:PersonInterface {\n\n\tname: ='Al Amin Khan',\n\n\tage:23 \n}"
292+
},
293+
{
294+
"definition": "অপশনাল প্রোপার্টি ডিক্লেয়ার না করেই প্রোপার্টি বাদ দেওয়া",
295+
"code": "interface PersonInterface {\n\tname:string;\n\tage:number; \n\tprofession:string;\n}"
296+
},
297+
{
298+
"definition": "Omit<PersonInterface,'property name you want to omit'> হ্যাকস ব্যবহার করে প্রোপার্টি বাদ দেওয়া যায়",
299+
"code": "const person1:Omit<PersonInterface,'profession'> {\n\n\tname: ='Al Amin Khan',\n\n\tage:23 \n}"
300+
}
301+
]
282302
}
283303
]
284304
}

0 commit comments

Comments
 (0)