diff --git a/docs/coding/typechecking.md b/docs/coding/typechecking.md index e9d0ff266114a30db7726b0918fa950d0760063e..8173bed845d4394f5ee49961c1189a76eefcb328 100644 --- a/docs/coding/typechecking.md +++ b/docs/coding/typechecking.md @@ -5,4 +5,16 @@ Satella typechecking is a complex solution for: * checking type compatibility at runtime If you do `@typed` on a class method, skip the type of self or cls, since Satella will -detect that it's annotating a class method. \ No newline at end of file +detect that it's annotating a class method. + +## Typechecking instance methods + +If you need to use `@typed` for instancemethods, do the following: + +```python +class Cheese(object): + + @typed('self', int, int): + def add_two_ints(self, a, b): + return a+b +``` \ No newline at end of file