We consider classes of functions uniquely determined by coefficients of their divergent expansions. By approximating a function in such a class by partial sums of its expansion we study how accuracy changes when we move within a region of the complex plane. This enables us to discover some features of Stokes phenomenon which are not covered in the literature. Based on these we propose a theory of divergent expansions, which includes Stokes phenomenon and asymptotics beyond all orders as its essential part. This in turn allows us to formulate necessary and sufficient conditions for divergent expansions to encounter Stokes' phenomenon and to present explicit expressions for asymptotics beyond all orders.