Skip to content

Commit

Permalink
Fix typo in Method Overriding in Typescript (kamranahmedse#4306)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusfj710 authored Aug 10, 2023
1 parent c1d37de commit 430350f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In TypeScript, method overriding is a mechanism where a subclass provides a new implementation for a method that is already defined in its parent class. This allows the subclass to inherit the behavior of the parent class, but change its behavior to fit its own needs.

To override a method in TypeScript, you need to use the `override` keyword, and the signature of the method in the subclass must match exactly with the signature of the method in the parent class.
To override a method in TypeScript the signature of the method in the subclass must match exactly with the signature of the method in the parent class.

```typescript
class Animal {
Expand Down

0 comments on commit 430350f

Please sign in to comment.