patronum
patronum copied to clipboard
Add timers api
Description
Closes #310
Checklist for a new method
- [x] Create a directory for the new method in the
src
directory inparam-case
- [x] Place the source code to
src/method-name/index.ts
in ESModules export incamelCase
named export - [x] Add tests to
src/method-name/method-name.test.ts
- [x] Add fork tests to
src/method-name/method-name.fork.test.ts
- [x] Add type tests to
test-typings/method-name.ts
- Use
// @ts-expect-error
to mark expected type error -
import { expectType } from 'tsd'
to check expected return type
- Use
- [x] Add documentation in
src/method-name/readme.md
- Add header
Patronum/MethodName
- Add section with overloads, if have
- Add
Motivation
,Formulae
,Arguments
andReturn
sections for each overload - Add useful examples in
Example
section for each overload
- Add header
- [x] Add section to
README.md
in the repository root- Add method to the table of contents into correct category
- [MethodName](#methodname) - description.
- Add section
## MethodName
- Add
[Method documentation & API](/src/method-name)
into section - Add simple example
- Add method to the table of contents into correct category
I think about 2 more features:
- Add support for SSR (set
$timers
value from effector provider, but how?) - Maybe add new function
now
, which don't accept "getNow" prop and returns "now" from$timers.now