Configure compiler to allow absolute imports from root (#147)
This commit is contained in:
parent
2eed1c432a
commit
5efcf61289
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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[]
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"baseUrl": "../",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
Loading…
Reference in New Issue
Block a user