-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from comake/feat/path-operators
Feat/path operators
- Loading branch information
Showing
27 changed files
with
352 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FindOperator } from '../FindOperator'; | ||
|
||
export interface InversePathValue { | ||
subPath: string | FindOperator<any, 'sequencePath' | 'zeroOrMorePath' | 'oneOrMorePath'>; | ||
value?: string; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export function InversePath< | ||
T extends InversePathValue | ||
>(value: T): FindOperator<T, 'inversePath'> { | ||
return new FindOperator({ | ||
operator: 'inversePath', | ||
value, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FindOperator } from '../FindOperator'; | ||
|
||
export interface OneOrMorePathValue { | ||
subPath: string | FindOperator<any, 'sequencePath' | 'inversePath'>; | ||
value?: string; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export function OneOrMorePath< | ||
T extends OneOrMorePathValue | ||
>(value: T): FindOperator<T, 'oneOrMorePath'> { | ||
return new FindOperator({ | ||
operator: 'oneOrMorePath', | ||
value, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FindOperator } from '../FindOperator'; | ||
|
||
export interface SequencePathValue { | ||
subPath: (string | FindOperator<any, 'zeroOrMorePath' | 'inversePath' | 'oneOrMorePath'>)[]; | ||
value?: string; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export function SequencePath< | ||
T extends SequencePathValue | ||
>(value: T): FindOperator<T, 'sequencePath'> { | ||
return new FindOperator({ | ||
operator: 'sequencePath', | ||
value, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FindOperator } from '../FindOperator'; | ||
|
||
export interface ZeroOrMorePathValue { | ||
subPath: string | FindOperator<any, 'sequencePath' | 'inversePath'>; | ||
value?: string; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export function ZeroOrMorePath< | ||
T extends ZeroOrMorePathValue | ||
>(value: T): FindOperator<T, 'zeroOrMorePath'> { | ||
return new FindOperator({ | ||
operator: 'zeroOrMorePath', | ||
value, | ||
}); | ||
} |
Oops, something went wrong.