Removed genType as it's not needed currently
This commit is contained in:
+2
-9
@@ -23,6 +23,7 @@
|
||||
{ "dir": "src/Debug" },
|
||||
{ "dir": "src/Equipment" },
|
||||
{ "dir": "src/Increasable" },
|
||||
{ "dir": "src/Increasable/__tests__", "type": "dev" },
|
||||
{ "dir": "src/Misc" },
|
||||
{ "dir": "src/Prerequisites" },
|
||||
{ "dir": "src/RaceCultureProfession" },
|
||||
@@ -51,13 +52,5 @@
|
||||
"error" : "+101"
|
||||
},
|
||||
"namespace": true,
|
||||
"refmt": 3,
|
||||
"gentypeconfig": {
|
||||
"module": "es6",
|
||||
"language": "typescript",
|
||||
"shims": {
|
||||
"Js": "Js",
|
||||
"ReasonPervasives": "ReasonPervasives"
|
||||
}
|
||||
}
|
||||
"refmt": 3
|
||||
}
|
||||
|
||||
Generated
-6
@@ -5285,12 +5285,6 @@
|
||||
"integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
|
||||
"dev": true
|
||||
},
|
||||
"gentype": {
|
||||
"version": "3.22.0",
|
||||
"resolved": "https://registry.npmjs.org/gentype/-/gentype-3.22.0.tgz",
|
||||
"integrity": "sha512-30tJrp6uWXODFzb+mWcW0sqbs5WB/3YHKV55IMPEMXZDDpjIDhpC3+8e0TRl8QzzOeZIaKYAD6XzcYM4KRA+1w==",
|
||||
"dev": true
|
||||
},
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
"eslint-plugin-react": "7.19.0",
|
||||
"eslint-plugin-react-hooks": "4.0.0",
|
||||
"fs-extra": "9.0.0",
|
||||
"gentype": "3.22.0",
|
||||
"jest": "26.0.1",
|
||||
"sass": "1.26.5",
|
||||
"ts-jest": "25.5.0",
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/* TypeScript file generated from Aside.re by genType. */
|
||||
/* eslint-disable import/first */
|
||||
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
// tslint:disable-next-line:no-var-requires
|
||||
const AsideBS = require('./Aside.bs');
|
||||
|
||||
// tslint:disable-next-line:interface-over-type-literal
|
||||
export type Props = { readonly children: React.ReactNode };
|
||||
|
||||
export const Aside: React.ComponentType<{ readonly children: React.ReactNode }> = AsideBS.make;
|
||||
@@ -1,4 +1,2 @@
|
||||
[@genType]
|
||||
[@genType.as "Aside"]
|
||||
[@react.component]
|
||||
let make = (~children) => <aside> children </aside>;
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/* TypeScript file generated from SegmentedControls.re by genType. */
|
||||
/* eslint-disable import/first */
|
||||
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
// tslint:disable-next-line:no-var-requires
|
||||
const SegmentedControlsBS = require('./SegmentedControls.bs');
|
||||
|
||||
import {list} from './ReasonPervasives.shim';
|
||||
|
||||
// tslint:disable-next-line:interface-over-type-literal
|
||||
export type segment<a> = {
|
||||
readonly name: string;
|
||||
readonly label: string;
|
||||
readonly value?: a;
|
||||
readonly disabled: boolean
|
||||
};
|
||||
|
||||
// tslint:disable-next-line:interface-over-type-literal
|
||||
export type Props<T1> = {
|
||||
readonly active?: T1;
|
||||
readonly disabled?: boolean;
|
||||
readonly label?: string;
|
||||
readonly name: string;
|
||||
readonly onClick: (_1:(null | undefined | T1)) => void;
|
||||
readonly onClickSafe: (_1:T1) => void;
|
||||
readonly options: list<segment<T1>>
|
||||
};
|
||||
|
||||
export const make: React.ComponentType<{
|
||||
readonly active?: any;
|
||||
readonly disabled?: boolean;
|
||||
readonly label?: string;
|
||||
readonly name: string;
|
||||
readonly onClick: (_1:(null | undefined | any)) => void;
|
||||
readonly onClickSafe: (_1:any) => void;
|
||||
readonly options: list<segment<any>>
|
||||
}> = SegmentedControlsBS.make;
|
||||
@@ -1,4 +1,3 @@
|
||||
[@genType]
|
||||
type segment('a) = {
|
||||
name: string,
|
||||
label: string,
|
||||
@@ -55,7 +54,6 @@ module Item = {
|
||||
};
|
||||
};
|
||||
|
||||
[@genType]
|
||||
[@react.component]
|
||||
let make =
|
||||
(
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/* TypeScript file generated from IO.rei by genType. */
|
||||
/* eslint-disable import/first */
|
||||
|
||||
|
||||
// tslint:disable-next-line:no-var-requires
|
||||
const Curry = require('bs-platform/lib/es6/curry.js');
|
||||
|
||||
// tslint:disable-next-line:no-var-requires
|
||||
const IOBS = require('./IO.bs');
|
||||
|
||||
export const Functor_fmap: <T1,T2>(_1:((_1:T1) => T2), _2:Promise<T1>) => Promise<T2> = function <T1,T2>(Arg1: any, Arg2: any) {
|
||||
const result = Curry._2(IOBS.Functor.fmap, Arg1, Arg2);
|
||||
return result
|
||||
};
|
||||
|
||||
export const Functor_fmapF: <T1,T2>(_1:Promise<T1>, _2:((_1:T1) => T2)) => Promise<T2> = function <T1,T2>(Arg1: any, Arg2: any) {
|
||||
const result = Curry._2(IOBS.Functor.fmapF, Arg1, Arg2);
|
||||
return result
|
||||
};
|
||||
@@ -49,13 +49,9 @@ module Functor = {
|
||||
let (<$>) = (f, m) =>
|
||||
Js.Promise.then_(x => f(x) |> Js.Promise.resolve, m);
|
||||
|
||||
[@genType]
|
||||
let fmap = (<$>);
|
||||
|
||||
let (<&>) = (m, f) => f <$> m;
|
||||
|
||||
[@genType]
|
||||
let fmapF = (<&>);
|
||||
};
|
||||
|
||||
module Monad = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
[@genType.ignoreInterface]
|
||||
type t('a) = Js.Promise.t('a);
|
||||
|
||||
type io('a) = t('a);
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/* TypeScript file generated from MapN.re by genType. */
|
||||
/* eslint-disable import/first */
|
||||
|
||||
|
||||
// tslint:disable-next-line:max-classes-per-file
|
||||
// tslint:disable-next-line:class-name
|
||||
export abstract class t<k,a> { protected opaque!: k | a }; /* simulate opaque types */
|
||||
export type OrderedMap<k,a> = t<k,a>;
|
||||
@@ -1,5 +1,3 @@
|
||||
[@genType]
|
||||
[@genType.as "OrderedMap"]
|
||||
type t('k, 'a);
|
||||
|
||||
module Native = {
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
|
||||
import * as Jest from "@glennsl/bs-jest/src/jest.js";
|
||||
import * as IC$OptolithClient from "../IC.bs.js";
|
||||
|
||||
Jest.describe("getAPForRange", (function (param) {
|
||||
Jest.test("returns positive int on increase", (function (param) {
|
||||
return Jest.Expect.toBe(2, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* A */0, 4, 6)));
|
||||
}));
|
||||
Jest.test("returns negative int on decrease", (function (param) {
|
||||
return Jest.Expect.toBe(-2, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* A */0, 4, 2)));
|
||||
}));
|
||||
Jest.test("returns positive int on multi increase above threshold", (function (param) {
|
||||
return Jest.Expect.toBe(27, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* C */2, 14, 16)));
|
||||
}));
|
||||
Jest.test("returns negative int on multi decrease above threshold", (function (param) {
|
||||
return Jest.Expect.toBe(-15, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* C */2, 14, 12)));
|
||||
}));
|
||||
Jest.test("returns positive int on multi increase around threshold for E", (function (param) {
|
||||
return Jest.Expect.toBe(45, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* E */4, 13, 15)));
|
||||
}));
|
||||
Jest.test("returns negative int on multi decrease for E", (function (param) {
|
||||
return Jest.Expect.toBe(-30, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* E */4, 13, 11)));
|
||||
}));
|
||||
return Jest.test("returns positive int on multi increase above threshold for E", (function (param) {
|
||||
return Jest.Expect.toBe(75, Jest.Expect.expect(IC$OptolithClient.getAPForRange(/* E */4, 14, 16)));
|
||||
}));
|
||||
}));
|
||||
|
||||
Jest.describe("getAPForInc", (function (param) {
|
||||
Jest.test("returns flat cost", (function (param) {
|
||||
return Jest.Expect.toBe(1, Jest.Expect.expect(IC$OptolithClient.getAPForInc(/* A */0, 4)));
|
||||
}));
|
||||
Jest.test("returns multiplied cost", (function (param) {
|
||||
return Jest.Expect.toBe(12, Jest.Expect.expect(IC$OptolithClient.getAPForInc(/* C */2, 14)));
|
||||
}));
|
||||
Jest.test("returns flat cost for E", (function (param) {
|
||||
return Jest.Expect.toBe(15, Jest.Expect.expect(IC$OptolithClient.getAPForInc(/* E */4, 13)));
|
||||
}));
|
||||
return Jest.test("returns multiplied cost for E", (function (param) {
|
||||
return Jest.Expect.toBe(30, Jest.Expect.expect(IC$OptolithClient.getAPForInc(/* E */4, 14)));
|
||||
}));
|
||||
}));
|
||||
|
||||
Jest.describe("getAPForDec", (function (param) {
|
||||
Jest.test("returns flat cost", (function (param) {
|
||||
return Jest.Expect.toBe(-1, Jest.Expect.expect(IC$OptolithClient.getAPForDec(/* A */0, 4)));
|
||||
}));
|
||||
Jest.test("returns multiplied cost", (function (param) {
|
||||
return Jest.Expect.toBe(-9, Jest.Expect.expect(IC$OptolithClient.getAPForDec(/* C */2, 14)));
|
||||
}));
|
||||
Jest.test("returns flat cost for E", (function (param) {
|
||||
return Jest.Expect.toBe(-15, Jest.Expect.expect(IC$OptolithClient.getAPForDec(/* E */4, 14)));
|
||||
}));
|
||||
return Jest.test("returns multiplied cost for E", (function (param) {
|
||||
return Jest.Expect.toBe(-30, Jest.Expect.expect(IC$OptolithClient.getAPForDec(/* E */4, 15)));
|
||||
}));
|
||||
}));
|
||||
|
||||
Jest.describe("getAPForActivatation", (function (param) {
|
||||
Jest.test("returns activation cost for A", (function (param) {
|
||||
return Jest.Expect.toBe(1, Jest.Expect.expect(IC$OptolithClient.getAPForActivatation(/* A */0)));
|
||||
}));
|
||||
Jest.test("returns activation cost for C", (function (param) {
|
||||
return Jest.Expect.toBe(3, Jest.Expect.expect(IC$OptolithClient.getAPForActivatation(/* C */2)));
|
||||
}));
|
||||
return Jest.test("returns activation cost for E", (function (param) {
|
||||
return Jest.Expect.toBe(15, Jest.Expect.expect(IC$OptolithClient.getAPForActivatation(/* E */4)));
|
||||
}));
|
||||
}));
|
||||
|
||||
Jest.describe("icToStr", (function (param) {
|
||||
Jest.test("returns name of A", (function (param) {
|
||||
return Jest.Expect.toBe("A", Jest.Expect.expect(IC$OptolithClient.icToStr(/* A */0)));
|
||||
}));
|
||||
return Jest.test("returns name of E", (function (param) {
|
||||
return Jest.Expect.toBe("E", Jest.Expect.expect(IC$OptolithClient.icToStr(/* E */4)));
|
||||
}));
|
||||
}));
|
||||
|
||||
export {
|
||||
|
||||
}
|
||||
/* Not a pure module */
|
||||
Reference in New Issue
Block a user