Skip to content

template literal types #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 7, 2021
10 changes: 9 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {TemplateLiteralPair} from './src/transform-inline/visitor-utils';

/**
* Checks if the given argument is assignable to the given type-argument.
*
Expand Down Expand Up @@ -258,6 +260,11 @@ interface ExpectedNull {
type: 'null';
}

interface ExpectedTemplateLiteral {
type: 'template-literal'
value: TemplateLiteralPair[]
}

type Reason = ExpectedFunction
| ExpectedString
| ExpectedNumber
Expand All @@ -277,7 +284,8 @@ type Reason = ExpectedFunction
| ExpectedNull
| ExpectedStringLiteral
| ExpectedNumberLiteral
| ExpectedBooleanLiteral;
| ExpectedBooleanLiteral
| ExpectedTemplateLiteral;

/**
* Set default getErrorObject function used for transpiled source.
Expand Down
Loading