-
-
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.
- Loading branch information
Showing
8 changed files
with
113 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as tsd from './tsd'; | ||
import * as tssert from './tssert'; | ||
|
||
export const assert = new Map(Object.entries({ tsd, tssert })); |
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,36 @@ | ||
import type ts from 'byots'; | ||
import type { Assertion } from '../../types'; | ||
import type { Compiler } from '../../../typescript/types'; | ||
import { createAssertionDiagnostic } from '../../diagnostics'; | ||
|
||
export function expectType(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectNotType(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectAssignable(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectNotAssignable(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectError(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectDeprecated(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function expectNotDeprecated(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function printType(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} |
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 type ts from 'byots'; | ||
import type { Assertion } from '../../types'; | ||
import type { Compiler } from '../../../typescript/types'; | ||
import { createAssertionDiagnostic } from '../../diagnostics'; | ||
|
||
export function expectType(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function assignableTo(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} | ||
|
||
export function notAssignableTo(assertion: Assertion, compiler: Compiler): ts.Diagnostic | undefined { | ||
return createAssertionDiagnostic('Not yet implemented.', compiler.sourceFile, assertion.node.getStart()); | ||
} |
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