UNPKG

1.95 kBSource Map (JSON)View Raw
1{"version":3,"names":["React","MISSING_CONTEXT_ERROR","createContext","isDefault","getKey","Error","setKey","getState","setState","getIsInitial"],"sources":["NavigationStateContext.tsx"],"sourcesContent":["import type { NavigationState, PartialState } from '@react-navigation/routers';\nimport * as React from 'react';\n\nconst MISSING_CONTEXT_ERROR =\n \"Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.\";\n\nexport default React.createContext<{\n isDefault?: true;\n state?: NavigationState | PartialState<NavigationState>;\n getKey: () => string | undefined;\n setKey: (key: string) => void;\n getState: () => NavigationState | PartialState<NavigationState> | undefined;\n setState: (\n state: NavigationState | PartialState<NavigationState> | undefined\n ) => void;\n getIsInitial: () => boolean;\n addOptionsGetter?: (\n key: string,\n getter: () => object | undefined | null\n ) => void;\n}>({\n isDefault: true,\n\n get getKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getIsInitial(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n});\n"],"mappings":"AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,MAAMC,qBAAqB,GACzB,wKADF;AAGA,4BAAeD,KAAK,CAACE,aAAN,CAcZ;EACDC,SAAS,EAAE,IADV;;EAGD,IAAIC,MAAJ,GAAkB;IAChB,MAAM,IAAIC,KAAJ,CAAUJ,qBAAV,CAAN;EACD,CALA;;EAMD,IAAIK,MAAJ,GAAkB;IAChB,MAAM,IAAID,KAAJ,CAAUJ,qBAAV,CAAN;EACD,CARA;;EASD,IAAIM,QAAJ,GAAoB;IAClB,MAAM,IAAIF,KAAJ,CAAUJ,qBAAV,CAAN;EACD,CAXA;;EAYD,IAAIO,QAAJ,GAAoB;IAClB,MAAM,IAAIH,KAAJ,CAAUJ,qBAAV,CAAN;EACD,CAdA;;EAeD,IAAIQ,YAAJ,GAAwB;IACtB,MAAM,IAAIJ,KAAJ,CAAUJ,qBAAV,CAAN;EACD;;AAjBA,CAdY,CAAf"}
\No newline at end of file