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 { Bet } from 'common/bet'
|
||||||
import { getProbability } from '../../../../common/calculate'
|
import { getProbability } from 'common/calculate'
|
||||||
import { Comment } from '../../../../common/comment'
|
import { Comment } from 'common/comment'
|
||||||
import { Contract } from '../../../../common/contract'
|
import { Contract } from 'common/contract'
|
||||||
import { removeUndefinedProps } from '../../../../common/util/object'
|
import { removeUndefinedProps } from 'common/util/object'
|
||||||
|
|
||||||
export type LiteMarket = {
|
export type LiteMarket = {
|
||||||
// Unique identifer for this market
|
// Unique identifer for this market
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
import { NextApiRequest, NextApiResponse } from 'next'
|
||||||
import { Bet, listAllBets } from '../../../../lib/firebase/bets'
|
import { Bet, listAllBets } from 'web/lib/firebase/bets'
|
||||||
import { listAllComments } from '../../../../lib/firebase/comments'
|
import { listAllComments } from 'web/lib/firebase/comments'
|
||||||
import { getContractFromId } from '../../../../lib/firebase/contracts'
|
import { getContractFromId } from 'web/lib/firebase/contracts'
|
||||||
|
import { applyCorsHeaders, CORS_UNRESTRICTED } from 'web/lib/api/cors'
|
||||||
import { FullMarket, ApiError, toLiteMarket } from '../_types'
|
import { FullMarket, ApiError, toLiteMarket } from '../_types'
|
||||||
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../../lib/api/cors'
|
|
||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Next.js API route support: https://vercel.com/docs/concepts/functions/serverless-functions
|
// Next.js API route support: https://vercel.com/docs/concepts/functions/serverless-functions
|
||||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
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 { toLiteMarket } from './_types'
|
||||||
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../lib/api/cors'
|
|
||||||
|
|
||||||
type Data = any[]
|
type Data = any[]
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
import { NextApiRequest, NextApiResponse } from 'next'
|
||||||
import { Bet, listAllBets } from '../../../../lib/firebase/bets'
|
import { applyCorsHeaders, CORS_UNRESTRICTED } from 'web/lib/api/cors'
|
||||||
import { listAllComments } from '../../../../lib/firebase/comments'
|
import { Bet, listAllBets } from 'web/lib/firebase/bets'
|
||||||
import { getContractFromSlug } from '../../../../lib/firebase/contracts'
|
import { listAllComments } from 'web/lib/firebase/comments'
|
||||||
|
import { getContractFromSlug } from 'web/lib/firebase/contracts'
|
||||||
import { FullMarket, ApiError, toLiteMarket } from '../_types'
|
import { FullMarket, ApiError, toLiteMarket } from '../_types'
|
||||||
import { applyCorsHeaders, CORS_UNRESTRICTED } from '../../../../lib/api/cors'
|
|
||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"baseUrl": "../",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user