Skip to content

Commit

Permalink
chore: update README with example docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stanimirovv committed Nov 19, 2023
1 parent 6c913b6 commit 7fc692b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ Use tsoogle to:

```bash
# find all that return a string
npx ts-node index.ts testproject.tsconfig.json ":string?"
/Users/dot/code/tsoogle/tests/testProject/class.ts:4 bar(string,string): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:5 asd2(string,number): string
npx ts-node index.ts testproject.tsconfig.json "string"
/Users/dot/code/tsoogle/tests/testProject/class.ts:4 bar(a: string,b: string): string
/Users/dot/code/tsoogle/tests/testProject/class.ts:12 asd(a: TestType): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:1 asd(a: string,b: string): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:5 asd2(a: string,b: number): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:9 asd3(): boolean | Record<string, string>

# find all that return a string, have 2 arguments and their first argument is a string
Expand All @@ -21,14 +23,13 @@ npx ts-node index.ts testproject.tsconfig.json ":string?string,*"
/Users/dot/code/tsoogle/tests/testProject/functions.ts:5 asd2(string,number): string

# find all that accept as parametes a string and a number and return anything
npx ts-node index.ts testproject.tsconfig.json ":*?string,number"
/Users/zlatinstanimirov/code/tsoogle/tests/testProject/functions.ts:5 asd2(string,number): string
npx ts-node index.ts testproject.tsconfig.json "string?string,*"
/Users/zlatinstanimirov/code/tsoogle/tests/testProject/class.ts:4 bar(a: string,b: string): string

# find all that accept as parameters a string and a number OR string and return anything
npx ts-node index.ts testproject.tsconfig.json ":*?string,number|string"
/Users/dot/code/tsoogle/tests/testProject/class.ts:4 bar(string,string): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:1 asd(string,string): string
/Users/dot/code/tsoogle/tests/testProject/functions.ts:5 asd2(string,number): strin
npx ts-node index.ts testproject.tsconfig.json "*?string,number|string"
/Users/zlatinstanimirov/code/tsoogle/tests/testProject/class.ts:4 bar(a: string,b: string): string
/Users/zlatinstanimirov/code/tsoogle/tests/testProject/class.ts:16 tt1(a: string,b: string[]): TestType

# it supports partial type checking
npx ts-node index.ts testproject.tsconfig.json ":*?{a&b}"
Expand Down

0 comments on commit 7fc692b

Please sign in to comment.