File tree Expand file tree Collapse file tree 3 files changed +28
-18
lines changed Expand file tree Collapse file tree 3 files changed +28
-18
lines changed Original file line number Diff line number Diff line change 11import { setMaxParserCache , clearParserCache } from './ParserCache.js' ;
2+ import {
3+ TypeCast ,
4+ Field as TypeCastField ,
5+ Geometry as TypeCastGeometry ,
6+ Next as TypeCastNext ,
7+ Type as TypeCastType ,
8+ } from './typeCast.js' ;
29
3- export { setMaxParserCache , clearParserCache } ;
10+ export {
11+ setMaxParserCache ,
12+ clearParserCache ,
13+ TypeCast ,
14+ TypeCastField ,
15+ TypeCastGeometry ,
16+ TypeCastNext ,
17+ TypeCastType ,
18+ } ;
Original file line number Diff line number Diff line change 1- type Geometry = {
1+ export type Geometry = {
22 x : number ;
33 y : number ;
44} ;
55
6- type Type = {
6+ export type Type = {
77 type :
88 | 'DECIMAL'
99 | 'TINY'
@@ -38,7 +38,7 @@ type Type = {
3838 | 'GEOMETRY' ;
3939} ;
4040
41- type Field = Type & {
41+ export type Field = Type & {
4242 length : number ;
4343 db : string ;
4444 table : string ;
@@ -48,6 +48,6 @@ type Field = Type & {
4848 geometry : ( ) => Geometry | Geometry [ ] | null ;
4949} ;
5050
51- type Next = ( ) => void ;
51+ export type Next = ( ) => void ;
5252
5353export type TypeCast = ( ( field : Field , next : Next ) => any ) | boolean ;
Original file line number Diff line number Diff line change 1- declare interface Field {
2- constructor : {
3- name : 'Field' ;
4- } ;
5- db : string ;
6- table : string ;
7- name : string ;
8- type : string ;
9- length : number ;
10- string : ( ) => any ;
11- buffer : ( ) => any ;
12- geometry : ( ) => any ;
13- }
1+ // TODO (major version): remove workaround for `Field` compatibility.
2+ import { TypeCastField } from '../../../lib/parsers/index.js' ;
3+
4+ /**
5+ * @deprecated
6+ * `Field` is deprecated and might be removed in the future major release. Please use `TypeCastField` type instead.
7+ */
8+ declare interface Field extends TypeCastField { }
149
1510export { Field } ;
You can’t perform that action at this time.
0 commit comments