@stdlib/math-base-napi-binary 0.0.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/main.c CHANGED
@@ -461,3 +461,603 @@ napi_value stdlib_math_base_napi_cc_c( napi_env env, napi_callback_info info, st
461
461
 
462
462
  return obj;
463
463
  }
464
+
465
+ /**
466
+ * Invokes a binary function accepting a double-precision floating-point number and a signed 32-bit integer and returning a double-precision floating-point number.
467
+ *
468
+ * ## Notes
469
+ *
470
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
471
+ *
472
+ * - `x`: input value.
473
+ * - `y`: input value.
474
+ *
475
+ * @param env environment under which the function is invoked
476
+ * @param info callback data
477
+ * @param fcn binary function
478
+ * @return function return value as a Node-API double-precision floating-point number
479
+ */
480
+ napi_value stdlib_math_base_napi_di_d( napi_env env, napi_callback_info info, double (*fcn)( double, int32_t ) ) {
481
+ napi_status status;
482
+
483
+ size_t argc = 2;
484
+ napi_value argv[ 2 ];
485
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
486
+ assert( status == napi_ok );
487
+
488
+ if ( argc < 2 ) {
489
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two numbers." );
490
+ assert( status == napi_ok );
491
+ return NULL;
492
+ }
493
+
494
+ napi_valuetype vtype0;
495
+ status = napi_typeof( env, argv[ 0 ], &vtype0 );
496
+ assert( status == napi_ok );
497
+ if ( vtype0 != napi_number ) {
498
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a number." );
499
+ assert( status == napi_ok );
500
+ return NULL;
501
+ }
502
+
503
+ napi_valuetype vtype1;
504
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
505
+ assert( status == napi_ok );
506
+ if ( vtype1 != napi_number ) {
507
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
508
+ assert( status == napi_ok );
509
+ return NULL;
510
+ }
511
+
512
+ double x;
513
+ status = napi_get_value_double( env, argv[ 0 ], &x );
514
+ assert( status == napi_ok );
515
+
516
+ int32_t y;
517
+ status = napi_get_value_int32( env, argv[ 1 ], &y );
518
+ assert( status == napi_ok );
519
+
520
+ napi_value v;
521
+ status = napi_create_double( env, fcn( x, y ), &v );
522
+ assert( status == napi_ok );
523
+
524
+ return v;
525
+ }
526
+
527
+ /**
528
+ * Invokes a binary function accepting a single-precision floating-point number and a signed 32-bit integer and returning a single-precision floating-point number.
529
+ *
530
+ * ## Notes
531
+ *
532
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
533
+ *
534
+ * - `x`: input value.
535
+ * - `y`: input value.
536
+ *
537
+ * @param env environment under which the function is invoked
538
+ * @param info callback data
539
+ * @param fcn binary function
540
+ * @return function return value as a Node-API double-precision floating-point number
541
+ */
542
+ napi_value stdlib_math_base_napi_fi_f( napi_env env, napi_callback_info info, float (*fcn)( float, int32_t ) ) {
543
+ napi_status status;
544
+
545
+ size_t argc = 2;
546
+ napi_value argv[ 2 ];
547
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
548
+ assert( status == napi_ok );
549
+
550
+ if ( argc < 2 ) {
551
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two numbers." );
552
+ assert( status == napi_ok );
553
+ return NULL;
554
+ }
555
+
556
+ napi_valuetype vtype0;
557
+ status = napi_typeof( env, argv[ 0 ], &vtype0 );
558
+ assert( status == napi_ok );
559
+ if ( vtype0 != napi_number ) {
560
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a number." );
561
+ assert( status == napi_ok );
562
+ return NULL;
563
+ }
564
+
565
+ napi_valuetype vtype1;
566
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
567
+ assert( status == napi_ok );
568
+ if ( vtype1 != napi_number ) {
569
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
570
+ assert( status == napi_ok );
571
+ return NULL;
572
+ }
573
+
574
+ double x;
575
+ status = napi_get_value_double( env, argv[ 0 ], &x );
576
+ assert( status == napi_ok );
577
+
578
+ int32_t y;
579
+ status = napi_get_value_int32( env, argv[ 1 ], &y );
580
+ assert( status == napi_ok );
581
+
582
+ napi_value v;
583
+ status = napi_create_double( env, (double)fcn( (float)x, y ), &v );
584
+ assert( status == napi_ok );
585
+
586
+ return v;
587
+ }
588
+
589
+ /**
590
+ * Invokes a binary function accepting a double-precision complex floating-point number and a signed 32-bit integer and returning a double-precision complex floating-point number.
591
+ *
592
+ * ## Notes
593
+ *
594
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
595
+ *
596
+ * - `x`: input value.
597
+ * - `y`: input value.
598
+ *
599
+ * @param env environment under which the function is invoked
600
+ * @param info callback data
601
+ * @param fcn binary function
602
+ * @return function return value as a Node-API complex-like object
603
+ */
604
+ napi_value stdlib_math_base_napi_zi_z( napi_env env, napi_callback_info info, stdlib_complex128_t (*fcn)( stdlib_complex128_t, int32_t ) ) {
605
+ napi_status status;
606
+
607
+ size_t argc = 2;
608
+ napi_value argv[ 2 ];
609
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
610
+ assert( status == napi_ok );
611
+
612
+ if ( argc < 2 ) {
613
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two arguments." );
614
+ assert( status == napi_ok );
615
+ return NULL;
616
+ }
617
+
618
+ bool hprop;
619
+ status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
620
+ assert( status == napi_ok );
621
+ if ( !hprop ) {
622
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component." );
623
+ assert( status == napi_ok );
624
+ return NULL;
625
+ }
626
+
627
+ napi_value xre;
628
+ status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
629
+ assert( status == napi_ok );
630
+
631
+ napi_valuetype xretype;
632
+ status = napi_typeof( env, xre, &xretype );
633
+ assert( status == napi_ok );
634
+ if ( xretype != napi_number ) {
635
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component which is a number." );
636
+ assert( status == napi_ok );
637
+ return NULL;
638
+ }
639
+
640
+ status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
641
+ assert( status == napi_ok );
642
+ if ( !hprop ) {
643
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component." );
644
+ assert( status == napi_ok );
645
+ return NULL;
646
+ }
647
+
648
+ napi_value xim;
649
+ status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
650
+ assert( status == napi_ok );
651
+
652
+ napi_valuetype ximtype;
653
+ status = napi_typeof( env, xim, &ximtype );
654
+ assert( status == napi_ok );
655
+ if ( ximtype != napi_number ) {
656
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component which a number." );
657
+ assert( status == napi_ok );
658
+ return NULL;
659
+ }
660
+
661
+ napi_valuetype vtype1;
662
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
663
+ assert( status == napi_ok );
664
+ if ( vtype1 != napi_number ) {
665
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
666
+ assert( status == napi_ok );
667
+ return NULL;
668
+ }
669
+
670
+ double re0;
671
+ status = napi_get_value_double( env, xre, &re0 );
672
+ assert( status == napi_ok );
673
+
674
+ double im0;
675
+ status = napi_get_value_double( env, xim, &im0 );
676
+ assert( status == napi_ok );
677
+
678
+ int32_t y;
679
+ status = napi_get_value_int32( env, argv[ 1 ], &y );
680
+ assert( status == napi_ok );
681
+
682
+ stdlib_complex128_t v = fcn( stdlib_complex128( re0, im0 ), y );
683
+ double re;
684
+ double im;
685
+ stdlib_reim( v, &re, &im );
686
+
687
+ napi_value obj;
688
+ status = napi_create_object( env, &obj );
689
+ assert( status == napi_ok );
690
+
691
+ napi_value vre;
692
+ status = napi_create_double( env, re, &vre );
693
+ assert( status == napi_ok );
694
+
695
+ status = napi_set_named_property( env, obj, "re", vre );
696
+ assert( status == napi_ok );
697
+
698
+ napi_value vim;
699
+ status = napi_create_double( env, im, &vim );
700
+ assert( status == napi_ok );
701
+
702
+ status = napi_set_named_property( env, obj, "im", vim );
703
+ assert( status == napi_ok );
704
+
705
+ return obj;
706
+ }
707
+
708
+ /**
709
+ * Invokes a binary function accepting a single-precision complex floating-point number and a signed 32-bit integer and returning a single-precision complex floating-point number.
710
+ *
711
+ * ## Notes
712
+ *
713
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
714
+ *
715
+ * - `x`: input value.
716
+ * - `y`: input value.
717
+ *
718
+ * @param env environment under which the function is invoked
719
+ * @param info callback data
720
+ * @param fcn binary function
721
+ * @return function return value as a Node-API complex-like object
722
+ */
723
+ napi_value stdlib_math_base_napi_ci_c( napi_env env, napi_callback_info info, stdlib_complex64_t (*fcn)( stdlib_complex64_t, int32_t ) ) {
724
+ napi_status status;
725
+
726
+ size_t argc = 2;
727
+ napi_value argv[ 2 ];
728
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
729
+ assert( status == napi_ok );
730
+
731
+ if ( argc < 2 ) {
732
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two arguments." );
733
+ assert( status == napi_ok );
734
+ return NULL;
735
+ }
736
+
737
+ bool hprop;
738
+ status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
739
+ assert( status == napi_ok );
740
+ if ( !hprop ) {
741
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component." );
742
+ assert( status == napi_ok );
743
+ return NULL;
744
+ }
745
+
746
+ napi_value xre;
747
+ status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
748
+ assert( status == napi_ok );
749
+
750
+ napi_valuetype xretype;
751
+ status = napi_typeof( env, xre, &xretype );
752
+ assert( status == napi_ok );
753
+ if ( xretype != napi_number ) {
754
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component which is a number." );
755
+ assert( status == napi_ok );
756
+ return NULL;
757
+ }
758
+
759
+ status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
760
+ assert( status == napi_ok );
761
+ if ( !hprop ) {
762
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component." );
763
+ assert( status == napi_ok );
764
+ return NULL;
765
+ }
766
+
767
+ napi_value xim;
768
+ status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
769
+ assert( status == napi_ok );
770
+
771
+ napi_valuetype ximtype;
772
+ status = napi_typeof( env, xim, &ximtype );
773
+ assert( status == napi_ok );
774
+ if ( ximtype != napi_number ) {
775
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component which a number." );
776
+ assert( status == napi_ok );
777
+ return NULL;
778
+ }
779
+
780
+ napi_valuetype vtype1;
781
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
782
+ assert( status == napi_ok );
783
+ if ( vtype1 != napi_number ) {
784
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
785
+ assert( status == napi_ok );
786
+ return NULL;
787
+ }
788
+
789
+ double re0;
790
+ status = napi_get_value_double( env, xre, &re0 );
791
+ assert( status == napi_ok );
792
+
793
+ double im0;
794
+ status = napi_get_value_double( env, xim, &im0 );
795
+ assert( status == napi_ok );
796
+
797
+ int32_t y;
798
+ status = napi_get_value_int32( env, argv[ 1 ], &y );
799
+ assert( status == napi_ok );
800
+
801
+ stdlib_complex64_t v = fcn( stdlib_complex64( (float)re0, (float)im0 ), y );
802
+ float re;
803
+ float im;
804
+ stdlib_reimf( v, &re, &im );
805
+
806
+ napi_value obj;
807
+ status = napi_create_object( env, &obj );
808
+ assert( status == napi_ok );
809
+
810
+ napi_value vre;
811
+ status = napi_create_double( env, (double)re, &vre );
812
+ assert( status == napi_ok );
813
+
814
+ status = napi_set_named_property( env, obj, "re", vre );
815
+ assert( status == napi_ok );
816
+
817
+ napi_value vim;
818
+ status = napi_create_double( env, (double)im, &vim );
819
+ assert( status == napi_ok );
820
+
821
+ status = napi_set_named_property( env, obj, "im", vim );
822
+ assert( status == napi_ok );
823
+
824
+ return obj;
825
+ }
826
+
827
+ /**
828
+ * Invokes a binary function accepting a double-precision complex floating-point number and a double-precision floating-point number and returning a double-precision complex floating-point number.
829
+ *
830
+ * ## Notes
831
+ *
832
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
833
+ *
834
+ * - `x`: input value.
835
+ * - `y`: input value.
836
+ *
837
+ * @param env environment under which the function is invoked
838
+ * @param info callback data
839
+ * @param fcn binary function
840
+ * @return function return value as a Node-API complex-like object
841
+ */
842
+ napi_value stdlib_math_base_napi_zd_z( napi_env env, napi_callback_info info, stdlib_complex128_t (*fcn)( stdlib_complex128_t, double ) ) {
843
+ napi_status status;
844
+
845
+ size_t argc = 2;
846
+ napi_value argv[ 2 ];
847
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
848
+ assert( status == napi_ok );
849
+
850
+ if ( argc < 2 ) {
851
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two arguments." );
852
+ assert( status == napi_ok );
853
+ return NULL;
854
+ }
855
+
856
+ bool hprop;
857
+ status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
858
+ assert( status == napi_ok );
859
+ if ( !hprop ) {
860
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component." );
861
+ assert( status == napi_ok );
862
+ return NULL;
863
+ }
864
+
865
+ napi_value xre;
866
+ status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
867
+ assert( status == napi_ok );
868
+
869
+ napi_valuetype xretype;
870
+ status = napi_typeof( env, xre, &xretype );
871
+ assert( status == napi_ok );
872
+ if ( xretype != napi_number ) {
873
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component which is a number." );
874
+ assert( status == napi_ok );
875
+ return NULL;
876
+ }
877
+
878
+ status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
879
+ assert( status == napi_ok );
880
+ if ( !hprop ) {
881
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component." );
882
+ assert( status == napi_ok );
883
+ return NULL;
884
+ }
885
+
886
+ napi_value xim;
887
+ status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
888
+ assert( status == napi_ok );
889
+
890
+ napi_valuetype ximtype;
891
+ status = napi_typeof( env, xim, &ximtype );
892
+ assert( status == napi_ok );
893
+ if ( ximtype != napi_number ) {
894
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component which a number." );
895
+ assert( status == napi_ok );
896
+ return NULL;
897
+ }
898
+
899
+ napi_valuetype vtype1;
900
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
901
+ assert( status == napi_ok );
902
+ if ( vtype1 != napi_number ) {
903
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
904
+ assert( status == napi_ok );
905
+ return NULL;
906
+ }
907
+
908
+ double re0;
909
+ status = napi_get_value_double( env, xre, &re0 );
910
+ assert( status == napi_ok );
911
+
912
+ double im0;
913
+ status = napi_get_value_double( env, xim, &im0 );
914
+ assert( status == napi_ok );
915
+
916
+ double y;
917
+ status = napi_get_value_double( env, argv[ 1 ], &y );
918
+ assert( status == napi_ok );
919
+
920
+ stdlib_complex128_t v = fcn( stdlib_complex128( re0, im0 ), y );
921
+ double re;
922
+ double im;
923
+ stdlib_reim( v, &re, &im );
924
+
925
+ napi_value obj;
926
+ status = napi_create_object( env, &obj );
927
+ assert( status == napi_ok );
928
+
929
+ napi_value vre;
930
+ status = napi_create_double( env, re, &vre );
931
+ assert( status == napi_ok );
932
+
933
+ status = napi_set_named_property( env, obj, "re", vre );
934
+ assert( status == napi_ok );
935
+
936
+ napi_value vim;
937
+ status = napi_create_double( env, im, &vim );
938
+ assert( status == napi_ok );
939
+
940
+ status = napi_set_named_property( env, obj, "im", vim );
941
+ assert( status == napi_ok );
942
+
943
+ return obj;
944
+ }
945
+
946
+ /**
947
+ * Invokes a binary function accepting a single-precision complex floating-point number and a single-precision floating-point number and returning a single-precision complex floating-point number.
948
+ *
949
+ * ## Notes
950
+ *
951
+ * - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
952
+ *
953
+ * - `x`: input value.
954
+ * - `y`: input value.
955
+ *
956
+ * @param env environment under which the function is invoked
957
+ * @param info callback data
958
+ * @param fcn binary function
959
+ * @return function return value as a Node-API complex-like object
960
+ */
961
+ napi_value stdlib_math_base_napi_cf_c( napi_env env, napi_callback_info info, stdlib_complex64_t (*fcn)( stdlib_complex64_t, float ) ) {
962
+ napi_status status;
963
+
964
+ size_t argc = 2;
965
+ napi_value argv[ 2 ];
966
+ status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL );
967
+ assert( status == napi_ok );
968
+
969
+ if ( argc < 2 ) {
970
+ status = napi_throw_error( env, NULL, "invalid invocation. Must provide two arguments." );
971
+ assert( status == napi_ok );
972
+ return NULL;
973
+ }
974
+
975
+ bool hprop;
976
+ status = napi_has_named_property( env, argv[ 0 ], "re", &hprop );
977
+ assert( status == napi_ok );
978
+ if ( !hprop ) {
979
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component." );
980
+ assert( status == napi_ok );
981
+ return NULL;
982
+ }
983
+
984
+ napi_value xre;
985
+ status = napi_get_named_property( env, argv[ 0 ], "re", &xre );
986
+ assert( status == napi_ok );
987
+
988
+ napi_valuetype xretype;
989
+ status = napi_typeof( env, xre, &xretype );
990
+ assert( status == napi_ok );
991
+ if ( xretype != napi_number ) {
992
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have a real component which is a number." );
993
+ assert( status == napi_ok );
994
+ return NULL;
995
+ }
996
+
997
+ status = napi_has_named_property( env, argv[ 0 ], "im", &hprop );
998
+ assert( status == napi_ok );
999
+ if ( !hprop ) {
1000
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component." );
1001
+ assert( status == napi_ok );
1002
+ return NULL;
1003
+ }
1004
+
1005
+ napi_value xim;
1006
+ status = napi_get_named_property( env, argv[ 0 ], "im", &xim );
1007
+ assert( status == napi_ok );
1008
+
1009
+ napi_valuetype ximtype;
1010
+ status = napi_typeof( env, xim, &ximtype );
1011
+ assert( status == napi_ok );
1012
+ if ( ximtype != napi_number ) {
1013
+ status = napi_throw_type_error( env, NULL, "invalid argument. First argument must have an imaginary component which a number." );
1014
+ assert( status == napi_ok );
1015
+ return NULL;
1016
+ }
1017
+
1018
+ napi_valuetype vtype1;
1019
+ status = napi_typeof( env, argv[ 1 ], &vtype1 );
1020
+ assert( status == napi_ok );
1021
+ if ( vtype1 != napi_number ) {
1022
+ status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." );
1023
+ assert( status == napi_ok );
1024
+ return NULL;
1025
+ }
1026
+
1027
+ double re0;
1028
+ status = napi_get_value_double( env, xre, &re0 );
1029
+ assert( status == napi_ok );
1030
+
1031
+ double im0;
1032
+ status = napi_get_value_double( env, xim, &im0 );
1033
+ assert( status == napi_ok );
1034
+
1035
+ double y;
1036
+ status = napi_get_value_double( env, argv[ 1 ], &y );
1037
+ assert( status == napi_ok );
1038
+
1039
+ stdlib_complex64_t v = fcn( stdlib_complex64( (float)re0, (float)im0 ), (float)y );
1040
+ float re;
1041
+ float im;
1042
+ stdlib_reimf( v, &re, &im );
1043
+
1044
+ napi_value obj;
1045
+ status = napi_create_object( env, &obj );
1046
+ assert( status == napi_ok );
1047
+
1048
+ napi_value vre;
1049
+ status = napi_create_double( env, (double)re, &vre );
1050
+ assert( status == napi_ok );
1051
+
1052
+ status = napi_set_named_property( env, obj, "re", vre );
1053
+ assert( status == napi_ok );
1054
+
1055
+ napi_value vim;
1056
+ status = napi_create_double( env, (double)im, &vim );
1057
+ assert( status == napi_ok );
1058
+
1059
+ status = napi_set_named_property( env, obj, "im", vim );
1060
+ assert( status == napi_ok );
1061
+
1062
+ return obj;
1063
+ }
@@ -1,28 +0,0 @@
1
- /*
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2020 The Stdlib Authors.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import headerDir = require( './index' );
20
-
21
-
22
- // TESTS //
23
-
24
- // The variable is a string...
25
- {
26
- // tslint:disable-next-line:no-unused-expression
27
- headerDir; // $ExpectType string
28
- }