1
1
type Nullable < T > = T | null | undefined
2
2
export declare namespace qrcode {
3
3
class QRCode {
4
- constructor ( data : string , squareSize ?: number , colorFn ?: qrcode . color . QRCodeColorFunction , shapeFn ?: qrcode . shape . QRCodeShapeFunction , graphicsFactory ?: qrcode . render . QRCodeGraphicsFactory , errorCorrectionLevel ?: qrcode . raw . ErrorCorrectionLevel , minTypeNum ?: number , doBefore ?: ( p0 : qrcode . QRCode , p1 : qrcode . render . QRCodeGraphics , p2 : number , p3 : number ) => void , doAfter ?: ( p0 : qrcode . QRCode , p1 : qrcode . render . QRCodeGraphics , p2 : number , p3 : number ) => void ) ;
4
+ constructor ( data : string , squareSize ?: number , colorFn ?: qrcode . color . QRCodeColorFunction , shapeFn ?: qrcode . shape . QRCodeShapeFunction , graphicsFactory ?: qrcode . render . QRCodeGraphicsFactory , errorCorrectionLevel ?: qrcode . raw . ErrorCorrectionLevel , minTypeNum ?: number , forceMinTypeNum ?: boolean , doBefore ?: ( p0 : qrcode . QRCode , p1 : qrcode . render . QRCodeGraphics , p2 : number , p3 : number ) => void , doAfter ?: ( p0 : qrcode . QRCode , p1 : qrcode . render . QRCodeGraphics , p2 : number , p3 : number ) => void ) ;
5
5
get data ( ) : string ;
6
6
get squareSize ( ) : number ;
7
7
get colorFn ( ) : qrcode . color . QRCodeColorFunction ;
@@ -27,7 +27,8 @@ export declare namespace qrcode {
27
27
}
28
28
export declare namespace qrcode {
29
29
class QRCodeBuilder {
30
- constructor ( shape : qrcode . QRCodeBuilder . QRCodeShapesEnum , customShapeFunction ?: Nullable < qrcode . shape . QRCodeShapeFunction > ) ;
30
+ constructor ( shape : any /* qrcode.QRCodeShapesEnum */ , customShapeFunction ?: Nullable < qrcode . shape . QRCodeShapeFunction > ) ;
31
+ withShape ( shape : any /* qrcode.QRCodeShapesEnum */ ) : qrcode . QRCodeBuilder ;
31
32
withSize ( size : number ) : qrcode . QRCodeBuilder ;
32
33
withColor ( color : number ) : qrcode . QRCodeBuilder ;
33
34
withBackgroundColor ( bgColor : number ) : qrcode . QRCodeBuilder ;
@@ -41,34 +42,10 @@ export declare namespace qrcode {
41
42
withCustomColorFunction ( colorFn : Nullable < qrcode . color . QRCodeColorFunction > ) : qrcode . QRCodeBuilder ;
42
43
withCustomShapeFunction ( shapeFn : Nullable < qrcode . shape . QRCodeShapeFunction > ) : qrcode . QRCodeBuilder ;
43
44
withErrorCorrectionLevel ( ecl : qrcode . raw . ErrorCorrectionLevel ) : qrcode . QRCodeBuilder ;
44
- withMinimumInformationDensity ( minTypeNum : number ) : qrcode . QRCodeBuilder ;
45
+ withInformationDensity ( minTypeNum : number ) : qrcode . QRCodeBuilder ;
46
+ forceInformationDensity ( forceInformationDensity : boolean ) : qrcode . QRCodeBuilder ;
45
47
build ( data : string ) : qrcode . QRCode ;
46
48
}
47
- namespace QRCodeBuilder {
48
- abstract class QRCodeShapesEnum {
49
- private constructor ( ) ;
50
- static get SQUARE ( ) : qrcode . QRCodeBuilder . QRCodeShapesEnum & {
51
- get name ( ) : "SQUARE" ;
52
- get ordinal ( ) : 0 ;
53
- } ;
54
- static get CIRCLE ( ) : qrcode . QRCodeBuilder . QRCodeShapesEnum & {
55
- get name ( ) : "CIRCLE" ;
56
- get ordinal ( ) : 1 ;
57
- } ;
58
- static get ROUNDED_SQUARE ( ) : qrcode . QRCodeBuilder . QRCodeShapesEnum & {
59
- get name ( ) : "ROUNDED_SQUARE" ;
60
- get ordinal ( ) : 2 ;
61
- } ;
62
- static get CUSTOM ( ) : qrcode . QRCodeBuilder . QRCodeShapesEnum & {
63
- get name ( ) : "CUSTOM" ;
64
- get ordinal ( ) : 3 ;
65
- } ;
66
- static values ( ) : Array < qrcode . QRCodeBuilder . QRCodeShapesEnum > ;
67
- static valueOf ( value : string ) : qrcode . QRCodeBuilder . QRCodeShapesEnum ;
68
- get name ( ) : "SQUARE" | "CIRCLE" | "ROUNDED_SQUARE" | "CUSTOM" ;
69
- get ordinal ( ) : 0 | 1 | 2 | 3 ;
70
- }
71
- }
72
49
}
73
50
export declare namespace qrcode . color {
74
51
const Colors : {
0 commit comments