Configure compiler to allow absolute imports from root (#147)

This commit is contained in:
Marshall Polaris 2022-05-08 13:33:58 -07:00 committed by GitHub
parent 2eed1c432a
commit 5efcf61289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 16 deletions

View File

@ -1,8 +1,8 @@
import { Bet } from '../../../../common/bet'
import { getProbability } from '../../../../common/calculate'
import { Comment } from '../../../../common/comment'
import { Contract } from '../../../../common/contract'
import { removeUndefinedProps } from '../../../../common/util/object'
import { Bet } from 'common/bet'
import { getProbability } from 'common/calculate'
import { Comment } from 'common/comment'
import { Contract } from 'common/contract'
import { removeUndefinedProps } from 'common/util/object'
export type LiteMarket = {
// Unique identifer for this market

View File

@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { Bet, listAllBets } from '../../../../lib/firebase/bets'
import { listAllComments } from '../../../../lib/firebase/comments'
import { getContractFromId } from '../../../../lib/firebase/contracts'
import { Bet, listAllBets } from 'web/lib/firebase/bets'
import { listAllComments } from 'web/lib/firebase/comments'
import { getContractFromId } from 'web/lib/firebase/contracts'
import { applyCorsHeaders, CORS_UNRESTRICTED } from 'web/lib/api/cors'
import { FullMarket, ApiError, toLiteMarket } from '../_types'
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../../lib/api/cors'
export default async function handler(
req: NextApiRequest,

View File

@ -1,8 +1,8 @@
// Next.js API route support: https://vercel.com/docs/concepts/functions/serverless-functions
import type { NextApiRequest, NextApiResponse } from 'next'
import { listAllContracts } from '../../../lib/firebase/contracts'
import { listAllContracts } from 'web/lib/firebase/contracts'
import { applyCorsHeaders, CORS_UNRESTRICTED } from 'web/lib/api/cors'
import { toLiteMarket } from './_types'
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../lib/api/cors'
type Data = any[]

View File

@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { Bet, listAllBets } from '../../../../lib/firebase/bets'
import { listAllComments } from '../../../../lib/firebase/comments'
import { getContractFromSlug } from '../../../../lib/firebase/contracts'
import { applyCorsHeaders, CORS_UNRESTRICTED } from 'web/lib/api/cors'
import { Bet, listAllBets } from 'web/lib/firebase/bets'
import { listAllComments } from 'web/lib/firebase/comments'
import { getContractFromSlug } from 'web/lib/firebase/contracts'
import { FullMarket, ApiError, toLiteMarket } from '../_types'
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../../lib/api/cors'
export default async function handler(
req: NextApiRequest,

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"baseUrl": "../",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,