@@ -15,7 +15,6 @@ import localizedFormat from "dayjs/plugin/localizedFormat.js";
1515import timezone from "dayjs/plugin/timezone.js" ;
1616import utc from "dayjs/plugin/utc.js" ;
1717
18-
1918/* eslint-disable import/no-named-as-default-member */
2019dayjs . extend ( utc ) ;
2120dayjs . extend ( timezone ) ;
@@ -32,9 +31,11 @@ const getColumnResolver = (c: string): ColumnResolver => {
3231
3332// eslint-disable-next-line @typescript-eslint/require-await
3433const getTable = async ( ) : Promise < Table > => {
35-
3634 const columnNames = [ "First Name" , "Last Name" ] ;
37- const tableRecords = [ { "First Name" : "Jack" , "Last Name" : "Bauer" } , { "First Name" : "Thomas" , "Last Name" : "Kirkman" } ]
35+ const tableRecords = [
36+ { "First Name" : "Jack" , "Last Name" : "Bauer" } ,
37+ { "First Name" : "Thomas" , "Last Name" : "Kirkman" } ,
38+ ] ;
3839 const columnDefinitions : Column [ ] = columnNames . map ( ( c ) => ( {
3940 name : c ,
4041 type : new Utf8 ( ) ,
@@ -48,15 +49,17 @@ const getTable = async (): Promise<Table> => {
4849 } ) ) ;
4950
5051 const tableResolver : TableResolver = ( clientMeta , parent , stream ) => {
51- for ( const r of tableRecords ) stream . write ( r )
52+ for ( const r of tableRecords ) stream . write ( r ) ;
5253 return Promise . resolve ( ) ;
5354 } ;
54- return createTable ( { name : "Names" , columns : columnDefinitions , resolver : tableResolver } ) ;
55+ return createTable ( {
56+ name : "Names" ,
57+ columns : columnDefinitions ,
58+ resolver : tableResolver ,
59+ } ) ;
5560} ;
5661
57- export const getTables = async (
58- ) : Promise < Table [ ] > => {
59-
62+ export const getTables = async ( ) : Promise < Table [ ] > => {
6063 const table = await getTable ( ) ;
6164 return [ table ] ;
6265} ;
0 commit comments