sfcode
An Online Competing and Development Environment
|
A simple internal DSL which allows you to invoke different functionality depending on version match. Used in codelyzer for keeping the code compatible across different versions of the Angular compiler.
In the example above will be invoked else
.
SemDSL(version: string)
- factory which accepts a version and returns an object.gte(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.lte(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.gt(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.lt(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.eq(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.neq(version: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
and else
properties.between(v1: string, v2: string, callback?: Function): ISemContextualDSL
- returns an object with elseIf
properties.elseIf
- returns an object of type ISemVerDSL
bound to the previous predicate.else
- invokes given callback if all of the previous conditions have failed.MIT