| 1793 | getParser() { |
| 1794 | return fromRefinement(this, Predicate.isString) |
| 1795 | } |
| 1796 | /** @internal */ |
| 1797 | matchPart(s: string, options: ParseOptions): string | undefined { |
| 1798 | const checks = this.checks |
| 1799 | return checks && !options.disableChecks && collectIssues(checks, s, undefined, this, options) ? undefined : s |
| 1800 | } |
| 1801 | /** @internal */ |
| 1802 | getExpected(): string { |
| 1803 | return "string" |
| 1804 | } |
| 1805 | } |
| 1806 | |
| 1807 | /** |
| 1808 | * Provides the singleton {@link String} AST instance. |
| 1809 | * |
| 1810 | * **When to use** |
| 1811 | * |
| 1812 | * Use as the shared `SchemaAST` node for unconstrained JavaScript strings. |
| 1813 | * |
| 1814 | * @see {@link String} for the AST node class |
| 1815 | * @see {@link isString} for narrowing an AST to a string node |
| 1816 | * |
| 1817 | * @category constructors |
| 1818 | * @since 4.0.0 |
| 1819 | */ |
| 1820 | export const string = new String() |
| 1821 | |
| 1822 | /** |
| 1823 | * AST node matching any `number` value (including `NaN`, `Infinity`, |
| 1824 | * `-Infinity`). |
| 1825 | * |
| 1826 | * **Details** |
| 1827 | * |