Skip to content

Commit 04012b7

Browse files
committed
chore: wip
1 parent 4f09533 commit 04012b7

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

fixtures/input/example-0001.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,14 @@ export const complexArrays = {
367367
// }
368368

369369
// Type Assertions and Guards
370-
// export function isUser(value: unknown): value is User {
371-
// return (
372-
// typeof value === 'object'
373-
// && value !== null
374-
// && 'id' in value
375-
// && 'email' in value
376-
// )
377-
// }
370+
export function isUser(value: unknown): value is User {
371+
return (
372+
typeof value === 'object'
373+
&& value !== null
374+
&& 'id' in value
375+
&& 'email' in value
376+
)
377+
}
378378

379379
// Branded Types
380380
export type UserId = string & { readonly __brand: unique symbol }

fixtures/output/example-0001.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export declare const complexArrays: {
133133
matrix: Array<Array<1 | 2 | Array<3 | 4 | Array<5 | 6>>> | Array<'a' | 'b' | Array<'c' | 'd'>> | Array<true | Array<false | Array<true>>>>;
134134
tuples: Array<Array<1 | 'string' | true> | Array<'literal' | 42 | false>>;
135135
};
136+
export declare function isUser(value: unknown): value is User;
136137
export declare type UserId = string & { readonly __brand: unique symbol };
137138
export declare type ProductId = number & {
138139
readonly __brand: unique symbol

0 commit comments

Comments
 (0)