⬆ MAJ TypeScript vers 3.9
parent
2b04fbbc1f
commit
ced589ad74
|
@ -4,6 +4,7 @@
|
|||
yarn-error.log
|
||||
package-lock.json
|
||||
node_modules/
|
||||
.env
|
||||
|
||||
# Local Netlify folder
|
||||
.netlify
|
|
@ -99,7 +99,7 @@ export const leftToRight = ({
|
|||
delay={delay}
|
||||
leave={{
|
||||
opacity: 0,
|
||||
position: 'absolute',
|
||||
position: 'absolute' as const,
|
||||
transform: 'translateX(-100%)'
|
||||
}}
|
||||
items={children}
|
||||
|
|
|
@ -36,14 +36,18 @@ import { useMemo } from 'react'
|
|||
import { DottedName } from 'Rules'
|
||||
import { Simulation, SimulationConfig } from 'Reducers/rootReducer'
|
||||
|
||||
type MissingVariables = Array<Partial<Record<DottedName, number>>>
|
||||
type MissingVariables = Partial<Record<DottedName, number>>
|
||||
export function getNextSteps(
|
||||
missingVariables: MissingVariables
|
||||
missingVariables: Array<MissingVariables>
|
||||
): Array<DottedName> {
|
||||
const byCount = ([, [count]]) => count
|
||||
const byScore = ([, [, score]]) => score
|
||||
|
||||
const missingByTotalScore = reduce(mergeWith(add), {}, missingVariables)
|
||||
const missingByTotalScore = reduce<MissingVariables, MissingVariables>(
|
||||
mergeWith(add),
|
||||
{},
|
||||
missingVariables
|
||||
)
|
||||
|
||||
const innerKeys = flatten(map(keys, missingVariables)),
|
||||
missingByTargetsAdvanced = countBy(identity, innerKeys)
|
||||
|
@ -53,9 +57,9 @@ export function getNextSteps(
|
|||
missingByTargetsAdvanced,
|
||||
missingByTotalScore
|
||||
),
|
||||
pairs = toPairs(missingByCompound),
|
||||
pairs = toPairs<number>(missingByCompound),
|
||||
sortedPairs = sortWith([descend(byCount), descend(byScore) as any], pairs)
|
||||
return map(head, sortedPairs)
|
||||
return map(head, sortedPairs) as any
|
||||
}
|
||||
|
||||
const similarity = (rule1 = '', rule2 = '') =>
|
||||
|
@ -67,7 +71,7 @@ const similarity = (rule1 = '', rule2 = '') =>
|
|||
)(rule1.split(' . '), rule2.split(' . '))
|
||||
|
||||
export function getNextQuestions(
|
||||
missingVariables: MissingVariables,
|
||||
missingVariables: Array<MissingVariables>,
|
||||
questionConfig: SimulationConfig['questions'] = {},
|
||||
answeredQuestions: Array<DottedName> = [],
|
||||
situation: Simulation['situation'] = {}
|
||||
|
|
|
@ -296,11 +296,11 @@ function IntegrationCode({
|
|||
)}
|
||||
<br />
|
||||
<em>src</em>
|
||||
="https://mon-entreprise.fr/simulateur-iframe-integration.js">
|
||||
="https://mon-entreprise.fr/simulateur-iframe-integration.js"{'>'}
|
||||
<span>{'<'}</span>
|
||||
<span>/</span>
|
||||
<em>script</em>
|
||||
<span>></span>
|
||||
<span>{'>'}</span>
|
||||
</code>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
"source-map-support": "^0.5.4",
|
||||
"style-loader": "^0.23.1",
|
||||
"toml-loader": "^1.0.0",
|
||||
"typescript": "^3.8.3",
|
||||
"typescript": "^3.9.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.39.3",
|
||||
"webpack-bundle-analyzer": "^3.7.0",
|
||||
|
@ -121,7 +121,7 @@
|
|||
"lint": "yarn lint:eslintrc && yarn lint:eslint && yarn lint:prettier",
|
||||
"test": "yarn workspaces run test",
|
||||
"prepare": "yarn workspace mon-entreprise run prepare",
|
||||
"test:type": "yarn workspaces run tsc --noEmit",
|
||||
"test:type": "yarn workspaces run tsc",
|
||||
"test:regressions": "jest",
|
||||
"link:publicodes": "yarn workspace publicodes link && yarn workspace mon-entreprise link publicodes"
|
||||
},
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
"noEmit": true,
|
||||
// The end goal is to enable `"strict": true` which correspond to the
|
||||
// following settings: noImplicitAny, noImplicitThis, alwaysStrict,
|
||||
// strictBindCallApply, strictNullChecks, strictFunctionTypes, and
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -5944,7 +5944,7 @@ https-proxy-agent@^4.0.0:
|
|||
vue-template-compiler "^2.6.11"
|
||||
yamljs "^0.3.0"
|
||||
|
||||
i18next@^19.0.1, i18next@^19.4.4:
|
||||
i18next@^19.0.1:
|
||||
version "19.4.4"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.4.4.tgz#c0a18bc2f2be554da636e67bfbf5200c7948b60d"
|
||||
integrity sha512-ofaHtdsDdX3A5nYur1HWblB7J4hIcjr2ACdnwTAJgc8hTfPbyzZfGX0hVkKpI3vzDIgO6Uzc4v1ffW2W6gG6zw==
|
||||
|
@ -9236,7 +9236,6 @@ public-encrypt@^4.0.0:
|
|||
version "1.0.0"
|
||||
dependencies:
|
||||
classnames "^2.2.6"
|
||||
i18next "^19.4.4"
|
||||
moo "^0.5.1"
|
||||
nearley "^2.19.2"
|
||||
ramda "^0.27.0"
|
||||
|
@ -11465,11 +11464,16 @@ typedarray@^0.0.6:
|
|||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^3.6.4, typescript@^3.8.3:
|
||||
typescript@^3.6.4:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
||||
|
||||
typescript@^3.9.2:
|
||||
version "3.9.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9"
|
||||
integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==
|
||||
|
||||
uglify-js@3.4.x:
|
||||
version "3.4.10"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f"
|
||||
|
|
Loading…
Reference in New Issue