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 1
1
import { 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' ;
2
9
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 = {
2
2
x : number ;
3
3
y : number ;
4
4
} ;
5
5
6
- type Type = {
6
+ export type Type = {
7
7
type :
8
8
| 'DECIMAL'
9
9
| 'TINY'
@@ -38,7 +38,7 @@ type Type = {
38
38
| 'GEOMETRY' ;
39
39
} ;
40
40
41
- type Field = Type & {
41
+ export type Field = Type & {
42
42
length : number ;
43
43
db : string ;
44
44
table : string ;
@@ -48,6 +48,6 @@ type Field = Type & {
48
48
geometry : ( ) => Geometry | Geometry [ ] | null ;
49
49
} ;
50
50
51
- type Next = ( ) => void ;
51
+ export type Next = ( ) => void ;
52
52
53
53
export 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 { }
14
9
15
10
export { Field } ;
You can’t perform that action at this time.
0 commit comments